diff options
author | Christopher Faylor <me@cgf.cx> | 2004-06-02 21:20:54 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-06-02 21:20:54 +0000 |
commit | 1a21f33188bf4530967c644e0e540b6b7db09c1d (patch) | |
tree | 00365e98d11979d42185c9d83ccdf15f3cf7eb2d /winsup/cygwin/path.cc | |
parent | 8b57e664af6cedcbd20a5f4c37ee364b5e13e97a (diff) | |
download | cygnal-1a21f33188bf4530967c644e0e540b6b7db09c1d.tar.gz cygnal-1a21f33188bf4530967c644e0e540b6b7db09c1d.tar.bz2 cygnal-1a21f33188bf4530967c644e0e540b6b7db09c1d.zip |
* spawn.cc (find_exec): Use has_slash to determine if path has a slash rather
than calculating this twice.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index b09450476..105092e58 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -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] == '\\') |