mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Link with libnbase.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "nbase.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* See the file tools/examples/minimal_client.c in the Subversion source
|
||||
@@ -56,24 +58,6 @@ do { \
|
||||
internal_error("assertion failed: " #expr); \
|
||||
} while (0)
|
||||
|
||||
static void *safe_malloc(size_t len)
|
||||
{
|
||||
void *p;
|
||||
|
||||
p = malloc(len);
|
||||
internal_assert(p != NULL);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static void *safe_realloc(void *p, size_t len)
|
||||
{
|
||||
p = realloc(p, len);
|
||||
internal_assert(p != NULL);
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static char *safe_strdup(const char *s)
|
||||
{
|
||||
char *t;
|
||||
|
||||
Reference in New Issue
Block a user