1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-15 01:46:35 +00:00

Move a useful function to nbase

This commit is contained in:
dmiller
2022-09-20 23:37:25 +00:00
parent 5ae6b75bf4
commit e9f3b12e07
4 changed files with 105 additions and 10 deletions

View File

@@ -566,16 +566,6 @@ error:
return -1;
}
// Like strchr, but don't go past end. Nulls not handled specially.
static const char *strchr_p(const char *str, const char *end, char c) {
assert(str && end >= str);
for (const char *q = str; q < end; q++) {
if (*q == c)
return q;
}
return NULL;
}
static std::vector<struct AVal> *str2AVal(const char *str, const char *end) {
int i = 1;
int count = 1;