Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-13 07:04:50 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-13 07:04:50 +0400
commit4863867ab9d6b417d23e22420e8f45264bc83724 (patch)
tree9dcf416c5bdcb0d16290780dd3956f3dbd40f164 /winsup
parent12a2ef446296efe35cc6c433af728ddbc38f8a17 (diff)
* path.cc (chdir): Minor cleanup.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/path.cc4
-rw-r--r--winsup/cygwin/uinfo.cc4
3 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0998a992a..fe029f3f4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2002-06-12 Christopher Faylor <cgf@redhat.com>
+ * path.cc (chdir): Minor cleanup.
+
+2002-06-12 Christopher Faylor <cgf@redhat.com>
+
* environ.cc (build_env): Correctly fill out windows environment block
with win32 paths rather than posix paths.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index a97c9df3c..cfa3ef241 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3240,7 +3240,7 @@ chdir (const char *in_dir)
res = 0;
}
- /* If res < 0, we didn't change to a new directory.
+ /* If res != 0, we didn't change to a new directory.
Otherwise, set the current windows and posix directory cache from input.
If the specified directory is a MS-DOS style directory or if the directory
was symlinked, convert the MS-DOS path back to posix style. Otherwise just
@@ -3250,7 +3250,7 @@ chdir (const char *in_dir)
do when we detect a symlink? Should we instead rebuild the posix path from
the input by traversing links? This would be an expensive operation but
we'll see if Cygwin mailing list users whine about the current behavior. */
- if (res == -1)
+ if (res)
__seterrno ();
else if ((!path.has_symlinks () && strpbrk (dir, ":\\") == NULL
&& pcheck_case == PCHECK_RELAXED) || isvirtual_dev (devn))
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 9bb0b69b2..1f28e92e4 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -71,8 +71,8 @@ internal_getlogin (cygheap_user &user)
user.set_domain (buf);
NetApiBufferFree (wui);
}
- if (!user.logsrv () && user.domain() &&
- get_logon_server(user.domain(), buf, NULL))
+ if (!user.logsrv () && user.domain () &&
+ get_logon_server (user.domain (), buf, NULL))
user.set_logsrv (buf + 2);
debug_printf ("Domain: %s, Logon Server: %s, Windows Username: %s",
user.domain (), user.logsrv (), user.name ());