aboutsummaryrefslogtreecommitdiff
path: root/nis/nss_nisplus/nisplus-proto.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-04-15 17:52:52 +0000
committerUlrich Drepper <drepper@redhat.com>2006-04-15 17:52:52 +0000
commit0944b9e1f09dafaa86d431f4f2497436fd48781b (patch)
treed8d6e9e7cc64b9334b61780bc4c95a0a57924015 /nis/nss_nisplus/nisplus-proto.c
parent004c62196365f1d2c71ce4aab53e6b12b04b4414 (diff)
downloadglibc-0944b9e1f09dafaa86d431f4f2497436fd48781b.tar
glibc-0944b9e1f09dafaa86d431f4f2497436fd48781b.tar.gz
glibc-0944b9e1f09dafaa86d431f4f2497436fd48781b.tar.bz2
glibc-0944b9e1f09dafaa86d431f4f2497436fd48781b.zip
* nis/nss_nisplus/nisplus-rpc.c (_nss_nisplus_parse_rpcent):
Significant cleanups. Correct adjustment for pointer array. Likewise.
Diffstat (limited to 'nis/nss_nisplus/nisplus-proto.c')
-rw-r--r--nis/nss_nisplus/nisplus-proto.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nis/nss_nisplus/nisplus-proto.c b/nis/nss_nisplus/nisplus-proto.c
index 02d8dbb658..0b96153819 100644
--- a/nis/nss_nisplus/nisplus-proto.c
+++ b/nis/nss_nisplus/nisplus-proto.c
@@ -78,8 +78,11 @@ _nss_nisplus_parse_protoent (nis_result *result, struct protoent *proto,
proto->p_proto = atoi (NISENTRYVAL (0, 2, result));
+ /* XXX Rewrite at some point to allocate the array first and then
+ copy the strings. It wasteful to first concatenate the strings
+ to just split them again later. */
char *line = first_unused;
- for (i = 0; i < result->objects.objects_len; ++i)
+ for (i = 0; i < NIS_RES_NUMOBJ (result); ++i)
{
if (strcmp (NISENTRYVAL (i, 1, result), proto->p_name) != 0)
{