summaryrefslogtreecommitdiff
path: root/nscd/servicescache.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/servicescache.c')
-rw-r--r--nscd/servicescache.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/nscd/servicescache.c b/nscd/servicescache.c
index e2d1e26a2f..c6f0b47e35 100644
--- a/nscd/servicescache.c
+++ b/nscd/servicescache.c
@@ -1,5 +1,5 @@
/* Cache handling for services lookup.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@drepper.com>, 2007.
@@ -136,10 +136,8 @@ cache_addserv (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, &dataset->strdata, req->key_len,
- &dataset->head, true, db, owner) < 0)
- /* Ensure the data can be recovered. */
- dataset->head.usable = false;
+ (void) cache_add (req->type, &dataset->strdata, req->key_len,
+ &dataset->head, true, db, owner);
pthread_rwlock_unlock (&db->lock);
@@ -332,11 +330,8 @@ cache_addserv (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, owner) < 0)
- /* Could not allocate memory. Make sure the
- data gets discarded. */
- dataset->head.usable = false;
+ (void) cache_add (req->type, key_copy, req->key_len,
+ &dataset->head, true, db, owner);
pthread_rwlock_unlock (&db->lock);
}