diff options
author | Christopher Faylor <me@cgf.cx> | 2004-05-04 15:09:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-05-04 15:09:58 +0000 |
commit | 3dcb399b58def966a940342ed3e421fdb3a8c435 (patch) | |
tree | 4993b8ad34956a8e6f8465b99a9d04a6fc3573d1 /winsup/cygwin/path.cc | |
parent | 423ea473f4898a97193344f13482ece1d8c31fe8 (diff) | |
download | cygnal-3dcb399b58def966a940342ed3e421fdb3a8c435.tar.gz cygnal-3dcb399b58def966a940342ed3e421fdb3a8c435.tar.bz2 cygnal-3dcb399b58def966a940342ed3e421fdb3a8c435.zip |
* path.cc (is_unc_share): Remove redundant tests.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 052749122..6944194ad 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -936,14 +936,12 @@ win32_device_name (const char *src_path, char *win32_path, device& dev) static bool __stdcall is_unc_share (const char *path) { - char *p = NULL; - int ret = (isdirsep (path[0]) - && isdirsep (path[1]) - && (isalnum (path[2]) || path[2] == '.') - && ((p = strpbrk (path + 3, "\\/")) != NULL)); - if (!ret || p == NULL) - return false; - return ret && isalnum (p[1]); + const char *p; + return (isdirsep (path[0]) + && isdirsep (path[1]) + && (isalnum (path[2]) || path[2] == '.') + && ((p = strpbrk (path + 3, "\\/")) != NULL) + && isalnum (p[1])); } /* Normalize a Win32 path. |