mirror of
https://github.com/nmap/nmap.git
synced 2025-12-31 03:49:01 +00:00
Moar const
This commit is contained in:
@@ -435,7 +435,7 @@ char *escape_windows_command_arg(const char *arg);
|
||||
|
||||
/* parse_long is like strtol or atoi, but it allows digits only.
|
||||
No whitespace, sign, or radix prefix. */
|
||||
long parse_long(const char *s, char **tail);
|
||||
long parse_long(const char *s, const char **tail);
|
||||
|
||||
/* This function takes a byte count and stores a short ascii equivalent
|
||||
in the supplied buffer. Eg: 0.122MB, 10.322Kb or 128B. */
|
||||
|
||||
@@ -602,7 +602,7 @@ int addrset_add_spec(struct addrset *set, const char *spec, int af, int dns)
|
||||
{
|
||||
char *local_spec;
|
||||
char *netmask_s;
|
||||
char *tail;
|
||||
const char *tail;
|
||||
long netmask_bits;
|
||||
struct addrinfo *addrs, *addr;
|
||||
struct addrset_elem *elem;
|
||||
@@ -789,7 +789,7 @@ static int parse_ipv4_ranges(struct addrset_elem *elem, const char *spec)
|
||||
} else {
|
||||
for (;;) {
|
||||
long start, end;
|
||||
char *tail;
|
||||
const char *tail;
|
||||
|
||||
errno = 0;
|
||||
start = parse_long(p, &tail);
|
||||
|
||||
@@ -700,7 +700,7 @@ char *hexdump(const u8 *cp, u32 length){
|
||||
|
||||
/* This is like strtol or atoi, but it allows digits only. No whitespace, sign,
|
||||
or radix prefix. */
|
||||
long parse_long(const char *s, char **tail)
|
||||
long parse_long(const char *s, const char **tail)
|
||||
{
|
||||
if (!isdigit((int) (unsigned char) *s)) {
|
||||
*tail = (char *) s;
|
||||
|
||||
Reference in New Issue
Block a user