dvd-sector-copy.c: Fix broken indentation.
[dvdrip] / dvd-sector-copy.c
index a608410..ee89f2a 100644 (file)
@@ -95,8 +95,8 @@ static void put_menu(dvd_reader_t *dvd, unsigned title)
   store_filename(fn, id);
   start = UDFFindFile(dvd, fn, &len); if (!start) return;
 #ifdef DEBUG
-      printf(";; %8"PRIuSEC" .. %-8"PRIuSEC": %s\n",
-            start, start + SECTORS(len), fn);
+  printf(";; %8"PRIuSEC" .. %-8"PRIuSEC": %s\n",
+        start, start + SECTORS(len), fn);
 #endif
   put_file(id, start, start + SECTORS(len));
 }
@@ -487,9 +487,9 @@ static ssize_t recovery_read_buffer(struct recoverybuf *r,
 #endif
     }
   } else if (pos > r->pos + r->end) {
-      r->pos = pos; r->start = r->end = 0;
+    r->pos = pos; r->start = r->end = 0;
 #ifdef DEBUG
-      show_recovery_buffer_map(r, "cleared; beyond previous region");
+    show_recovery_buffer_map(r, "cleared; beyond previous region");
 #endif
   } else if (pos + want > r->pos + r->sz) {
     diff = (pos + want) - (r->pos + r->sz);
@@ -1043,7 +1043,7 @@ int main(int argc, char *argv[])
 #endif
   }
 
-  open_dvd(device, O_RDONLY, &dvdfd, &dvd);
+  if (open_dvd(device, O_RDONLY, &dvdfd, &dvd)) exit(2);
 
   blksz = SECTORSZ; volsz = device_size(dvdfd, device, &blksz);
   if (blksz != SECTORSZ)
@@ -1053,7 +1053,7 @@ int main(int argc, char *argv[])
         device, volsz, SECTORSZ);
 
   if (f&f_checkid) {
-    open_dvd(outfile, O_RDONLY, 0, &dvd_out);
+    if (open_dvd(outfile, O_RDONLY, 0, &dvd_out)) exit(2);
     if (dvd_id(id_in, dvd, DIF_MUSTIFOHASH, device) ||
        dvd_id(id_out, dvd_out, DIF_MUSTIFOHASH, device))
       exit(2);