aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-06-13 14:27:58 +0200
committerMaria Matejka <mq@ucw.cz>2019-06-13 14:27:58 +0200
commit5c864e2cfaf5ff5e8e3db3ccd746162fbc7aac5b (patch)
tree01fbbd6cd1a7122fcdca1a38c48d6e854763ad9d /lib
parent87c82334a77dfa3fea3057fa6d4bcf8558f203a4 (diff)
downloadbird-5c864e2cfaf5ff5e8e3db3ccd746162fbc7aac5b.tar.gz
String: bstrtoul macro expanded to bstrtoul10 and 16
Diffstat (limited to 'lib')
-rw-r--r--lib/ip.c2
-rw-r--r--lib/string.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/lib/ip.c b/lib/ip.c
index 0f5a5348..2d195160 100644
--- a/lib/ip.c
+++ b/lib/ip.c
@@ -245,7 +245,7 @@ ip4_pton(const char *a, ip4_addr *o)
char *d, *c = strchr(a, '.');
if (!c != !i)
return 0;
- l = bstrtoul(a, &d, 10);
+ l = bstrtoul10(a, &d);
if (((d != c) && *d) || (l > 255))
return 0;
ia = (ia << 8) | l;
diff --git a/lib/string.h b/lib/string.h
index 5f7c4666..6e549cb7 100644
--- a/lib/string.h
+++ b/lib/string.h
@@ -24,7 +24,6 @@ int buffer_vprint(buffer *buf, const char *fmt, va_list args);
int buffer_print(buffer *buf, const char *fmt, ...);
void buffer_puts(buffer *buf, const char *str);
-#define bstrtoul(str, end, base) bstrtoul##base(str, end)
u64 bstrtoul10(const char *str, char **end);
u64 bstrtoul16(const char *str, char **end);