ntdll: Avoid examining uninitialized data.

This commit is contained in:
Bart Van Assche 2011-03-30 20:50:12 +02:00 committed by Alexandre Julliard
parent bc3ba2f06e
commit e5fe510720
1 changed files with 3 additions and 4 deletions

View File

@ -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;