Commit e5fe5107 authored by Bart Van Assche's avatar Bart Van Assche Committed by Alexandre Julliard

ntdll: Avoid examining uninitialized data.

parent bc3ba2f0
...@@ -923,7 +923,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) ...@@ -923,7 +923,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct statfs stfs; struct statfs stfs;
statfs( dir, &stfs ); if (statfs( dir, &stfs ) == -1) return FALSE;
/* Assume these file systems are always case insensitive on Mac OS. /* Assume these file systems are always case insensitive on Mac OS.
* For FreeBSD, only assume CIOPFS is case insensitive (AFAIK, Mac OS * For FreeBSD, only assume CIOPFS is case insensitive (AFAIK, Mac OS
* is the only UNIX that supports case-insensitive lookup). * is the only UNIX that supports case-insensitive lookup).
...@@ -960,7 +960,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) ...@@ -960,7 +960,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
#elif defined(__NetBSD__) #elif defined(__NetBSD__)
struct statvfs stfs; struct statvfs stfs;
statvfs( dir, &stfs ); if (statvfs( dir, &stfs ) == -1) return FALSE;
/* Only assume CIOPFS is case insensitive. */ /* Only assume CIOPFS is case insensitive. */
if (strcmp( stfs.f_fstypename, "fusefs" ) || if (strcmp( stfs.f_fstypename, "fusefs" ) ||
strncmp( stfs.f_mntfromname, "ciopfs", 5 )) strncmp( stfs.f_mntfromname, "ciopfs", 5 ))
...@@ -973,7 +973,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir ) ...@@ -973,7 +973,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
char *cifile; char *cifile;
/* Only assume CIOPFS is case insensitive. */ /* Only assume CIOPFS is case insensitive. */
statfs( dir, &stfs ); if (statfs( dir, &stfs ) == -1) return FALSE;
if (stfs.f_type != 0x65735546 /* FUSE_SUPER_MAGIC */) if (stfs.f_type != 0x65735546 /* FUSE_SUPER_MAGIC */)
return TRUE; return TRUE;
/* Normally, we'd have to parse the mtab to find out exactly what /* Normally, we'd have to parse the mtab to find out exactly what
...@@ -2175,7 +2175,6 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i ...@@ -2175,7 +2175,6 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
} }
} }
closedir( dir ); closedir( dir );
goto not_found; /* avoid warning */
not_found: not_found:
unix_name[pos - 1] = 0; unix_name[pos - 1] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment