summaryrefslogtreecommitdiff
path: root/nss/protocols.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2006-11-17 22:55:51 +0000
committerArthur de Jong <arthur@arthurdejong.org>2006-11-17 22:55:51 +0000
commite2e2a4e5eb7ed84e66f7f027fdb01cffeaf9b9f1 (patch)
treebf2b74e68ea640ee663503b97202c8b7f2fa0164 /nss/protocols.c
parentac028b7925b99391167ad96f288fe46c05c961c1 (diff)
do some refactoring in the generated code and add some documentation on generated code in comments in common.h
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@96 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/protocols.c')
-rw-r--r--nss/protocols.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nss/protocols.c b/nss/protocols.c
index a9e4297..3e4584c 100644
--- a/nss/protocols.c
+++ b/nss/protocols.c
@@ -62,19 +62,18 @@ enum nss_status _nss_ldap_getprotobynumber_r(int number,struct protoent *result,
/* thread-local file pointer to an ongoing request */
static __thread FILE *protoentfp;
-#define fp protoentfp
enum nss_status _nss_ldap_setprotoent(int stayopen)
{
- NSS_SETENT(NSLCD_ACTION_PROTOCOL_ALL);
+ NSS_SETENT(protoentfp,NSLCD_ACTION_PROTOCOL_ALL);
}
enum nss_status _nss_ldap_getprotoent_r(struct protoent *result,char *buffer,size_t buflen,int *errnop)
{
- NSS_GETENT(read_protoent);
+ NSS_GETENT(protoentfp,read_protoent);
}
enum nss_status _nss_ldap_endprotoent(void)
{
- NSS_ENDENT();
+ NSS_ENDENT(protoentfp);
}