summary refs log tree commit diff
path: root/nis/nss_nisplus/nisplus-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nisplus/nisplus-service.c')
-rw-r--r--nis/nss_nisplus/nisplus-service.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nis/nss_nisplus/nisplus-service.c b/nis/nss_nisplus/nisplus-service.c
index 8f681d3e1c..04fed59808 100644
--- a/nis/nss_nisplus/nisplus-service.c
+++ b/nis/nss_nisplus/nisplus-service.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -84,7 +84,7 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
   p = first_unused;
 
   line = p;
-  for (i = 0; i < result->objects.objects_len; i++)
+  for (i = 0; i < result->objects.objects_len; ++i)
     {
       if (strcmp (NISENTRYVAL (i, 1, result), serv->s_name) != 0)
         {
@@ -97,7 +97,7 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
           room_left -= (NISENTRYLEN (i, 1, result) + 1);
         }
     }
-  ++p;
+  *p++ = '\0';
   first_unused = p;
 
   /* Adjust the pointer so it is aligned for