mirror of
https://git.burble.com/burble.dn42/bird.git
synced 2024-05-12 03:55:05 +00:00
String: bstrtoul macro expanded to bstrtoul10 and 16
This commit is contained in:
2
lib/ip.c
2
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;
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user