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 )
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct statfs stfs;
statfs( dir, &stfs );
if (statfs( dir, &stfs ) == -1) return FALSE;
/* Assume these file systems are always case insensitive on Mac OS.
* For FreeBSD, only assume CIOPFS is case insensitive (AFAIK, Mac OS
* is the only UNIX that supports case-insensitive lookup).
......@@ -960,7 +960,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
#elif defined(__NetBSD__)
struct statvfs stfs;
statvfs( dir, &stfs );
if (statvfs( dir, &stfs ) == -1) return FALSE;
/* Only assume CIOPFS is case insensitive. */
if (strcmp( stfs.f_fstypename, "fusefs" ) ||
strncmp( stfs.f_mntfromname, "ciopfs", 5 ))
......@@ -973,7 +973,7 @@ static BOOLEAN get_dir_case_sensitivity_stat( const char *dir )
char *cifile;
/* Only assume CIOPFS is case insensitive. */
statfs( dir, &stfs );
if (statfs( dir, &stfs ) == -1) return FALSE;
if (stfs.f_type != 0x65735546 /* FUSE_SUPER_MAGIC */)
return TRUE;
/* 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
}
}
closedir( dir );
goto not_found; /* avoid warning */
not_found:
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