From ce113ea02980563133c547bb0693864951ce16a5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 4 Jan 2011 08:42:16 +0100 Subject: nsswitch: remove includes.h dependency from nsstest.c metze --- nsswitch/nsstest.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'nsswitch') diff --git a/nsswitch/nsstest.c b/nsswitch/nsstest.c index 8742b328c7..d84e028513 100644 --- a/nsswitch/nsstest.c +++ b/nsswitch/nsstest.c @@ -18,16 +18,9 @@ along with this program. If not, see . */ -#include "includes.h" +#include "replace.h" #include "nsswitch/nsstest.h" -#ifdef malloc -#undef malloc -#endif -#ifdef realloc -#undef realloc -#endif - static const char *so_path = "/lib/libnss_winbind.so"; static const char *nss_name = "winbind"; static int nss_errno; @@ -55,10 +48,10 @@ static void *find_fn(const char *name) if (!res) { printf("Can't find function %s\n", s); total_errors++; - SAFE_FREE(s); + free(s); return NULL; } - SAFE_FREE(s); + free(s); return res; } @@ -201,12 +194,12 @@ again: goto again; } if (status == NSS_STATUS_NOTFOUND) { - SAFE_FREE(buf); + free(buf); return NULL; } if (status != NSS_STATUS_SUCCESS) { report_nss_error("getgrent", status); - SAFE_FREE(buf); + free(buf); return NULL; } return &grp; @@ -239,12 +232,12 @@ again: goto again; } if (status == NSS_STATUS_NOTFOUND) { - SAFE_FREE(buf); + free(buf); return NULL; } if (status != NSS_STATUS_SUCCESS) { report_nss_error("getgrnam", status); - SAFE_FREE(buf); + free(buf); return NULL; } return &grp; @@ -278,12 +271,12 @@ again: goto again; } if (status == NSS_STATUS_NOTFOUND) { - SAFE_FREE(buf); + free(buf); return NULL; } if (status != NSS_STATUS_SUCCESS) { report_nss_error("getgrgid", status); - SAFE_FREE(buf); + free(buf); return NULL; } return &grp; -- cgit