diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-03-29 14:42:11 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-03-29 14:42:11 +0400 |
commit | 5f660ecf247e43918946a84a164269ae8082e73f (patch) | |
tree | 466bd7fcbd83ad3d6b2be0de48ffcfc5c6548ae1 /winsup/cygwin/passwd.cc | |
parent | cabe8aa22ae768527ebb921ece53b14a2d0ca7ca (diff) |
* autoload.cc (UuidCreate): Remove.
(UuidCreateSequential): Remove.
* passwd.cc (internal_getpwsid): Avoid a strict-aliasing compiler
error with gcc 4.5.1.
* fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Ditto.
* ntdll.h (NtAllocateUuids): Declare.
* syscalls.cc (gethostid): Use NtAllocateUuids function rather than
UuidCreateSequential/UuidCreate to get rid of rpcrt4 dependency.
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r-- | winsup/cygwin/passwd.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 8c51c22a0..44343af7f 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -98,11 +98,14 @@ internal_getpwsid (cygpsid &sid) { endptr = strchr (sid_string + 2, 0) - 1; for (int i = 0; i < pr.curr_lines; i++) - if ((pw = passwd_buf + i)->pw_dir > pw->pw_gecos + 8) - for (ptr1 = endptr, ptr2 = pw->pw_dir - 2; - *ptr1 == *ptr2; ptr2--) - if (!*--ptr1) - return pw; + { + pw = passwd_buf + i; + if (pw->pw_dir > pw->pw_gecos + 8) + for (ptr1 = endptr, ptr2 = pw->pw_dir - 2; + *ptr1 == *ptr2; ptr2--) + if (!*--ptr1) + return pw; + } } return NULL; } |