mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Reduce use of utils.h for error functions
This commit is contained in:
9
utils.cc
9
utils.cc
@@ -131,6 +131,7 @@
|
||||
|
||||
#include "nmap.h"
|
||||
#include "utils.h"
|
||||
#include "nmap_error.h"
|
||||
#include "NmapOps.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
@@ -191,14 +192,6 @@ void nmap_hexdump(unsigned char *cp, unsigned int length) {
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
char *strerror(int errnum) {
|
||||
static char buf[1024];
|
||||
sprintf(buf, "your system is too old for strerror of errno %d\n", errnum);
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Like the perl equivalent, removes the terminating newline from string IF one
|
||||
exists. It then returns the POSSIBLY MODIFIED string. */
|
||||
char *chomp(char *string) {
|
||||
|
||||
Reference in New Issue
Block a user