From e2e2a4e5eb7ed84e66f7f027fdb01cffeaf9b9f1 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 17 Nov 2006 22:55:51 +0000 Subject: 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 --- nss/group.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'nss/group.c') diff --git a/nss/group.c b/nss/group.c index cdac7d5..04c45a8 100644 --- a/nss/group.c +++ b/nss/group.c @@ -113,7 +113,7 @@ enum nss_status _nss_ldap_initgroups_dyn( (*groupsp)[*start++]=gid; num++; /* read next response code */ - READ_TYPE(fp,cd,int32_t); + READ_TYPE(fp,cd,int32_t); } /* close socket and we're done */ fclose(fp); @@ -122,19 +122,18 @@ enum nss_status _nss_ldap_initgroups_dyn( /* thread-local file pointer to an ongoing request */ static __thread FILE *grentfp; -#define fp grentfp enum nss_status _nss_ldap_setgrent(int stayopen) { - NSS_SETENT(NSLCD_ACTION_GROUP_ALL); + NSS_SETENT(grentfp,NSLCD_ACTION_GROUP_ALL); } enum nss_status _nss_ldap_getgrent_r(struct group *result,char *buffer,size_t buflen,int *errnop) { - NSS_GETENT(read_group); + NSS_GETENT(grentfp,read_group); } enum nss_status _nss_ldap_endgrent(void) { - NSS_ENDENT(); + NSS_ENDENT(grentfp); } -- cgit v1.2.3