summaryrefslogtreecommitdiff
path: root/nss/protocols.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-12-23 19:56:29 +0000
committerArthur de Jong <arthur@arthurdejong.org>2012-12-23 19:56:29 +0000
commitade4c9a0c0e9d251c9d1ffee3dcf4abfb007a6b6 (patch)
tree79e69076dda3b7a918eef47b85c53084c282c069 /nss/protocols.c
parenta7b5935ec4b09e75ac5bf6de73ec80984d54cd68 (diff)
merge NSS_BYNAME and NSS_BYINT32 into NSS_BYGEN and rename to NSS_GETONE
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1876 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nss/protocols.c')
-rw-r--r--nss/protocols.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/nss/protocols.c b/nss/protocols.c
index b4c349e..cc1e60f 100644
--- a/nss/protocols.c
+++ b/nss/protocols.c
@@ -51,8 +51,8 @@ nss_status_t _nss_ldap_getprotobyname_r(const char *name,
char *buffer, size_t buflen,
int *errnop)
{
- NSS_BYNAME(NSLCD_ACTION_PROTOCOL_BYNAME,
- name,
+ NSS_GETONE(NSLCD_ACTION_PROTOCOL_BYNAME,
+ WRITE_STRING(fp, name),
read_protoent(fp, result, buffer, buflen, errnop));
}
@@ -61,9 +61,9 @@ nss_status_t _nss_ldap_getprotobynumber_r(int number, struct protoent *result,
char *buffer, size_t buflen,
int *errnop)
{
- NSS_BYINT32(NSLCD_ACTION_PROTOCOL_BYNUMBER,
- number,
- read_protoent(fp, result, buffer, buflen, errnop));
+ NSS_GETONE(NSLCD_ACTION_PROTOCOL_BYNUMBER,
+ WRITE_INT32(fp, number),
+ read_protoent(fp, result, buffer, buflen, errnop));
}
/* thread-local file pointer to an ongoing request */
@@ -119,16 +119,16 @@ static nss_status_t read_result(TFILE *fp, nss_XbyY_args_t *args)
static nss_status_t protocols_getprotobyname(nss_backend_t UNUSED(*be), void *args)
{
- NSS_BYNAME(NSLCD_ACTION_PROTOCOL_BYNAME,
- NSS_ARGS(args)->key.name,
+ NSS_GETONE(NSLCD_ACTION_PROTOCOL_BYNAME,
+ WRITE_STRING(fp, NSS_ARGS(args)->key.name),
read_result(fp, args));
}
static nss_status_t protocols_getprotobynumber(nss_backend_t UNUSED(*be), void *args)
{
- NSS_BYINT32(NSLCD_ACTION_PROTOCOL_BYNUMBER,
- NSS_ARGS(args)->key.number,
- read_result(fp, args));
+ NSS_GETONE(NSLCD_ACTION_PROTOCOL_BYNUMBER,
+ WRITE_INT32(fp, NSS_ARGS(args)->key.number),
+ read_result(fp, args));
}
static nss_status_t protocols_setprotoent(nss_backend_t *be, void UNUSED(*args))