diff options
Diffstat (limited to 'nscd/initgrcache.c')
-rw-r--r-- | nscd/initgrcache.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index 6a95fb5992..94e909d4ae 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -1,5 +1,5 @@ /* Cache handling for host lookup. - Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. @@ -230,10 +230,8 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, /* Now get the lock to safely insert the records. */ pthread_rwlock_rdlock (&db->lock); - if (cache_add (req->type, key_copy, req->key_len, - &dataset->head, true, db, uid) < 0) - /* Ensure the data can be recovered. */ - dataset->head.usable = false; + (void) cache_add (req->type, key_copy, req->key_len, + &dataset->head, true, db, uid); pthread_rwlock_unlock (&db->lock); @@ -399,11 +397,8 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, /* Now get the lock to safely insert the records. */ pthread_rwlock_rdlock (&db->lock); - if (cache_add (INITGROUPS, cp, req->key_len, &dataset->head, true, - db, uid) < 0) - /* Could not allocate memory. Make sure the data gets - discarded. */ - dataset->head.usable = false; + (void) cache_add (INITGROUPS, cp, req->key_len, &dataset->head, true, + db, uid); pthread_rwlock_unlock (&db->lock); } |