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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-05-05 00:39:38 +0400
committerChristopher Faylor <me@cgf.cx>2001-05-05 00:39:38 +0400
commit17743fbc49ebb23300e0a36d8c5a27ed63e2bf41 (patch)
tree5ac0733972c757a0b3b75229f419add2a0a33902 /winsup/cygwin/path.cc
parent8b3bcfbab9d0a96b133d6076971ea11bfd52e288 (diff)
* exceptions.cc (ctrl_c_handler): Always send signal to process if it has no
tty.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 3814039b2..053fab2a4 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2837,17 +2837,13 @@ hash_path_name (unsigned long hash, const char *name)
if (name[1] == ':')
{
char *nn, *newname = (char *) alloca (strlen (name) + 2);
- nn = strncpy (newname, name, 2);
- if (isupper (*nn))
- *newname = cyg_tolower (*nn);
- *(nn += 2) = '\0';
+ nn = newname;
+ *nn = isupper (*name) ? cyg_tolower (*name) : *name;
+ *++nn = ':';
name += 2;
if (*name != '\\')
- {
- *nn = '\\';
- *++nn = '\0';
- }
- strcpy (nn, name);
+ *++nn = '\\';
+ strcpy (++nn, name);
name = newname;
goto hashit;
}