]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_nss_db_getaliasent_r): Don't include terminating null in key size.
authorUlrich Drepper <drepper@redhat.com>
Fri, 30 Jan 1998 17:14:42 +0000 (17:14 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 30 Jan 1998 17:14:42 +0000 (17:14 +0000)
nss/nss_db/db-alias.c

index 349ce9cfb227e4a500d3873b65e54029b675d8c2..fa63ca9ad3d8da1701823ef27e49d932805e803f 100644 (file)
@@ -1,5 +1,5 @@
 /* Mail alias file parser in nss_db module.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -220,13 +220,13 @@ lookup (const DBT *key, struct aliasent *result, char *buffer,
 enum nss_status
 _nss_db_getaliasent_r (struct aliasent *result, char *buffer, size_t buflen)
 {
-  /* Return next entry in host file.  */
+  /* Return next entry in alias file.  */
   enum nss_status status;
   char buf[20];
   DBT key;
 
   __libc_lock_lock (lock);
-  key.size = 1 + snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
+  key.size = snprintf (key.data = buf, sizeof buf, "0%u", entidx++);
   status = lookup (&key, result, buffer, buflen);
   __libc_lock_unlock (lock);