* nscd/servicescache.c (cache_addserv): Likewise.
* nscd/grpcache.c (cache_addgr): In case a record changed on
refresh, adjust key_copy.
2007-02-21 Ulrich Drepper <drepper@redhat.com>
+ * nscd/hstcache.c (cache_addhst): Remove unnecessary conditional.
+ * nscd/servicescache.c (cache_addserv): Likewise.
+
+ * nscd/grpcache.c (cache_addgr): In case a record changed on
+ refresh, adjust key_copy.
+
[BZ #4074]
* nscd/pwdcache.c (cache_addpw): In case a record changed on
refresh, adjust key_copy.
/* Adjust pointers into the memory block. */
gr_name = (char *) newp + (gr_name - (char *) dataset);
cp = (char *) newp + (cp - (char *) dataset);
+ key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + n);
alloca_used = false;
/* Adjust pointers into the memory block. */
addresses = (char *) newp + (addresses - (char *) dataset);
aliases = (char *) newp + (aliases - (char *) dataset);
- if (key_copy != NULL)
- key_copy = (char *) newp + (key_copy - (char *) dataset);
+ assert (key_copy != NULL);
+ key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + req->key_len);
alloca_used = false;
{
/* Adjust pointers into the memory block. */
aliases = (char *) newp + (aliases - (char *) dataset);
- if (key_copy != NULL)
- key_copy = (char *) newp + (key_copy - (char *) dataset);
+ assert (key_copy != NULL);
+ key_copy = (char *) newp + (key_copy - (char *) dataset);
dataset = memcpy (newp, dataset, total + req->key_len);
alloca_used = false;