Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nss/protocols.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/protocols.c')
-rw-r--r--nss/protocols.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nss/protocols.c b/nss/protocols.c
index c641eaa..d635830 100644
--- a/nss/protocols.c
+++ b/nss/protocols.c
@@ -2,7 +2,7 @@
protocols.c - NSS lookup functions for protocol database
Copyright (C) 2006 West Consulting
- Copyright (C) 2006, 2007, 2008, 2010 Arthur de Jong
+ Copyright (C) 2006, 2007, 2008, 2010, 2012 Arthur de Jong
Copyright (C) 2010 Symas Corporation
This library is free software; you can redistribute it and/or
@@ -103,7 +103,7 @@ static nss_status_t read_protostring(TFILE *fp,nss_XbyY_args_t *args)
size_t buflen;
int i;
/* read the protoent */
- retv=read_protoent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&errno);
+ retv=read_protoent(fp,&result,NSS_ARGS(args)->buf.buffer,args->buf.buflen,&NSS_ARGS(args)->erange);
if (retv!=NSS_STATUS_SUCCESS)
return retv;
/* allocate a temporary buffer */
@@ -128,7 +128,7 @@ static nss_status_t read_protostring(TFILE *fp,nss_XbyY_args_t *args)
#define READ_RESULT(fp) \
NSS_ARGS(args)->buf.result? \
- read_protoent(fp,(struct protoent *)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno): \
+ read_protoent(fp,(struct protoent *)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange): \
read_protostring(fp,args); \
if ((NSS_ARGS(args)->buf.result)&&(retv==NSS_STATUS_SUCCESS)) \
NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;
@@ -136,7 +136,7 @@ static nss_status_t read_protostring(TFILE *fp,nss_XbyY_args_t *args)
#else /* not HAVE_STRUCT_NSS_XBYY_ARGS_RETURNLEN */
#define READ_RESULT(fp) \
- read_protoent(fp,(struct protoent *)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&errno); \
+ read_protoent(fp,(struct protoent *)NSS_ARGS(args)->buf.result,NSS_ARGS(args)->buf.buffer,NSS_ARGS(args)->buf.buflen,&NSS_ARGS(args)->erange); \
if (retv==NSS_STATUS_SUCCESS) \
NSS_ARGS(args)->returnval=NSS_ARGS(args)->buf.result;