win32_capture_streams(): Fix uninitialized return value in non-default case
authorEric Biggers <ebiggers3@gmail.com>
Sat, 31 Aug 2013 23:46:05 +0000 (18:46 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 31 Aug 2013 23:46:05 +0000 (18:46 -0500)
src/win32_capture.c

index ed4bb7f..33fe3a4 100644 (file)
@@ -1141,19 +1141,14 @@ unnamed_only:
        /* FindFirstStream() API is not available, or the volume does not
         * support named streams.  Only capture the unnamed data stream. */
        DEBUG("Only capturing unnamed data stream");
-       if (!(inode->i_attributes & (FILE_ATTRIBUTE_DIRECTORY |
-                                    FILE_ATTRIBUTE_REPARSE_POINT)))
-       {
-               wcscpy(dat.cStreamName, L"::$DATA");
-               dat.StreamSize.QuadPart = file_size;
-               ret = win32_capture_stream(path,
-                                          path_num_chars,
-                                          inode, lookup_table,
-                                          &dat);
-               if (ret)
-                       return ret;
-       }
-       return ret;
+       if (inode->i_attributes & (FILE_ATTRIBUTE_DIRECTORY |
+                                  FILE_ATTRIBUTE_REPARSE_POINT))
+               return 0;
+
+       wcscpy(dat.cStreamName, L"::$DATA");
+       dat.StreamSize.QuadPart = file_size;
+       return win32_capture_stream(path, path_num_chars,
+                                   inode, lookup_table, &dat);
 }
 
 static int