dvd-sector-copy.c: Make constants local to the only function which uses them.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 15 Apr 2022 15:58:21 +0000 (16:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 15 Apr 2022 16:17:44 +0000 (17:17 +0100)
dvd-sector-copy.c

index 019e382..8408f41 100644 (file)
@@ -700,9 +700,6 @@ static double sectors_to_angle(secaddr base, secaddr low, secaddr high)
 #undef K
 }
 
-#define LAYER_LIMIT 2298496            /* maximum (user) sectors on layer */
-#define DVDROM_OFFSET 0x30000          /* usual initial physical sector */
-
 enum {
   FLAT,                                        /* not actually a real DVD */
   SINGLE,                              /* disc with only one layer */
@@ -733,6 +730,9 @@ static void setup_geometry(struct geometry *g, int fd, unsigned f,
 #endif
   secaddr t;
 
+#define LAYER_LIMIT 2298496            /* maximum (user) sectors on layer */
+#define DVDROM_OFFSET 0x30000          /* usual initial physical sector */
+
   if (!(f&GF_BLKDEV)) {
     /* We're reading from a regular file.  Assume that progress will be
      * linear.
@@ -804,6 +804,9 @@ guess_structure:
     t -= DVDROM_OFFSET;
     g->midpoint = t;
   }
+
+#undef LAYER_LIMIT
+#undef DVDROM_OFFSET
 }
 
 static double linear_progress(const struct geometry *g,