summaryrefslogtreecommitdiff
path: root/nsswitch/nsstest.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-01-04 08:42:16 +0100
committerStefan Metzmacher <metze@samba.org>2011-01-04 08:43:42 +0100
commitce113ea02980563133c547bb0693864951ce16a5 (patch)
treeaf9baae6578472bd46d0cc081063b387dd60ed9e /nsswitch/nsstest.c
parent263642b536ee25af89f9ed836e2bad6b92d3bed0 (diff)
downloadsamba-ce113ea02980563133c547bb0693864951ce16a5.tar.gz
samba-ce113ea02980563133c547bb0693864951ce16a5.tar.bz2
samba-ce113ea02980563133c547bb0693864951ce16a5.zip
nsswitch: remove includes.h dependency from nsstest.c
metze
Diffstat (limited to 'nsswitch/nsstest.c')
-rw-r--r--nsswitch/nsstest.c25
1 files changed, 9 insertions, 16 deletions
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 <http://www.gnu.org/licenses/>.
*/
-#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;