diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-10-15 07:31:04 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-10-15 07:31:04 +0000 |
commit | 378e8bab9688c447e7567b5066ef26482a4fd8f1 (patch) | |
tree | 8b26c8de92c9e555d78b6c0ec4f416e65257fc3d /nscd | |
parent | 68a071d274b5bd3049ab3ec7cd5cbb901aa95ccd (diff) |
Updated to fedora-glibc-20071015T0728cvs/fedora-glibc-2_6_90-21
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/nscd_getgr_r.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c index afb4d20435..b84b06b3ce 100644 --- a/nscd/nscd_getgr_r.c +++ b/nscd/nscd_getgr_r.c @@ -266,18 +266,16 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, /* If there are no group members TOTAL_LEN is zero. */ if (gr_name == NULL) { - if (total_len > 0) + if (total_len > 0 + && __builtin_expect (__readall (sock, resultbuf->gr_mem[0], + total_len) != total_len, 0)) { - size_t n = __readall (sock, resultbuf->gr_mem[0], total_len); - if (__builtin_expect (n != total_len, 0)) - { - /* The `errno' to some value != ERANGE. */ - __set_errno (ENOENT); - retval = ENOENT; - } - else - *result = resultbuf; + /* The `errno' to some value != ERANGE. */ + __set_errno (ENOENT); + retval = ENOENT; } + else + *result = resultbuf; } else { |