* spawn.cc (find_exec): Use has_slash to determine if path has a slash rather

than calculating this twice.
This commit is contained in:
Christopher Faylor
2004-06-02 21:20:54 +00:00
parent 8b57e664af
commit 1a21f33188
4 changed files with 21 additions and 13 deletions

View File

@@ -2197,14 +2197,14 @@ mount_info::add_item (const char *native, const char *posix, unsigned mountflags
posixerr = normalize_posix_path (posix, posixtmp, &posixtail);
debug_printf ("%s[%s], %s[%s], %p",
native, nativeerr?error:nativetmp,
posix, posixerr?error:posixtmp, mountflags);
native, nativeerr ? error : nativetmp,
posix, posixerr ? error : posixtmp, mountflags);
if (nativeerr || posixerr)
if (nativeerr || posixerr)
{
set_errno (nativeerr?:posixerr);
return -1;
}
return -1;
}
/* Make sure both paths do not end in /. */
if (nativetail > nativetmp + 1 && nativetail[-1] == '\\')