* path.cc (check_sysfile): Don't scan string twice.
This commit is contained in:
parent
1af84bb7f5
commit
ad7ba32b2d
|
@ -1,3 +1,7 @@
|
|||
2004-05-04 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (check_sysfile): Don't scan string twice.
|
||||
|
||||
2004-05-03 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* dir.cc (writable_directory): Remove.
|
||||
|
|
|
@ -2786,8 +2786,9 @@ check_sysfile (const char *path, DWORD fileattr, HANDLE h,
|
|||
NUL. The length returned is the path without
|
||||
*any* trailing NULs. We also have to handle (or
|
||||
at least not die from) corrupted paths. */
|
||||
if (memchr (contents, 0, got) != NULL)
|
||||
res = strlen (contents);
|
||||
char *end;
|
||||
if ((end = (char *) memchr (contents, 0, got)) != NULL)
|
||||
res = end - contents;
|
||||
else
|
||||
res = got;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue