diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-19 19:22:02 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-19 19:22:02 +0000 |
commit | b677d6742888747613ebb4dbe4bbb4dbe6e07087 (patch) | |
tree | 97ebb6523b2a78ebccff54651bf2fe7736943ec5 /nis/nss_nis/nis-netgrp.c | |
parent | 978bd14399d7b027513676bb1ad9c8b8def71174 (diff) | |
download | glibc-b677d6742888747613ebb4dbe4bbb4dbe6e07087.tar.gz glibc-b677d6742888747613ebb4dbe4bbb4dbe6e07087.tar.xz glibc-b677d6742888747613ebb4dbe4bbb4dbe6e07087.zip |
Update.
2003-01-19 Ulrich Drepper <drepper@redhat.com> * nis/nss_nis/nis-spwd.c: Make _nss_nis_endspent an alias of _nss_nis_setspent. Work around the different prototypes. * nis/nss_nis/nis-rpc.c (internal_nis_setrpcent): Use internal_nis_endrpcent. (internal_nis_endrpcent): Change return type to void. Change callers. * nis/nss_nis/nis-pwd.c: Make _nss_nis_endpwent an alias of _nss_nis_setpwent. Work around the different prototypes. * nis/nss_nis/nis-proto.c (_nss_nis_endprotoent): Split out body of the function to... (internal_nis_endprotoent): ... here. New function. (internal_nis_setprotoent): Use internal_nis_endprotoent. * nis/nss_nis/nis-network.c: Make _nss_nis_endnetent an alias of _nss_nis_setnetent. Work around the different prototypes. * nis/nss_nis/nis-netgrp.c (_nss_nis_endnetgrent): Split out body of the function to... (internal_nis_endnetgrent): ... here. New function. (_nss_nis_setnetgrent): Use internal_nis_endnetgrent.
Diffstat (limited to 'nis/nss_nis/nis-netgrp.c')
-rw-r--r-- | nis/nss_nis/nis-netgrp.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/nis/nss_nis/nis-netgrp.c b/nis/nss_nis/nis-netgrp.c index c9b52428c3..e9318d6e95 100644 --- a/nis/nss_nis/nis-netgrp.c +++ b/nis/nss_nis/nis-netgrp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1999,2000,2002,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996. @@ -42,6 +42,19 @@ extern enum nss_status _nss_netgroup_parseline (char **cursor, struct __netgrent *result, char *buffer, size_t buflen, int *errnop); + +static void +internal_nis_endnetgrent (void) +{ + if (data != NULL) + { + free (data); + data = NULL; + data_size = 0; + cursor = NULL; + } +} + enum nss_status _nss_nis_setnetgrent (const char *group, struct __netgrent *dummy) { @@ -60,13 +73,7 @@ _nss_nis_setnetgrent (const char *group, struct __netgrent *dummy) __libc_lock_lock (lock); - if (data != NULL) - { - free (data); - data = NULL; - data_size = 0; - cursor = NULL; - } + internal_nis_endnetgrent (); group_len = strlen (group); @@ -96,13 +103,7 @@ _nss_nis_endnetgrent (struct __netgrent *dummy) { __libc_lock_lock (lock); - if (data != NULL) - { - free (data); - data = NULL; - data_size = 0; - cursor = NULL; - } + internal_nis_endnetgrent (); __libc_lock_unlock (lock); |