changeset 360:b6fa98f690ee src

more braces removed
author nicodvb
date Sat, 10 May 2008 20:53:00 +0000
parents e2973c342e59
children 4cc7655e7b30
files dvdread/dvd_udf.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/dvdread/dvd_udf.c	Sat May 10 20:46:42 2008 +0000
+++ b/dvdread/dvd_udf.c	Sat May 10 20:53:00 2008 +0000
@@ -236,9 +236,8 @@
   if(c == NULL) {
     c = calloc(1, sizeof(struct udf_cache));    
     /* fprintf(stderr, "calloc: %d\n", sizeof(struct udf_cache)); */
-    if(c == NULL) {
+    if(c == NULL)
       return 0;
-    }
     SetUDFCacheHandle(device, c);
   }
 
@@ -555,9 +554,9 @@
 
       if(!GetUDFCache(device, LBUDFCache, lbnum, &cached_dir)) {
           dir_lba = (Dir.Length + DVD_VIDEO_LB_LEN) / DVD_VIDEO_LB_LEN;
-          if((cached_dir_base = malloc(dir_lba * DVD_VIDEO_LB_LEN + 2048)) == NULL) {
+          if((cached_dir_base = malloc(dir_lba * DVD_VIDEO_LB_LEN + 2048)) == NULL)
             return 0;
-          }
+
           cached_dir = (uint8_t *)(((uintptr_t)cached_dir_base & ~((uintptr_t)2047)) + 2048);
           if( DVDReadLBUDF( device, lbnum, dir_lba, cached_dir, 0) <= 0 ) {
             free(cached_dir_base);
@@ -679,13 +678,12 @@
         terminate = 1;
       } else {
         /* TODO: Find last sector of the disc (this is optional). */
-        if( lastsector ) {
+        if( lastsector )
           /* Try #2, backup anchor */
           lbnum = lastsector - 256;
-        } else {
+        else
           /* Unable to find last sector */
           return 0;
-        }
       }
     } else
       /* It's an anchor! We can leave */
@@ -749,7 +747,7 @@
                 part->valid = ( partnum == part->Number );
             } else if( ( TagID == 6 ) && ( !volvalid ) ) {
                 /* Logical Volume Descriptor */
-                if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) {  
+                if( UDFLogVolume( LogBlock, part->VolumeDesc ) ) {
                     /* TODO: sector size wrong! */
                 } else
                     volvalid = 1;