summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/birdlib.h2
-rw-r--r--lib/printf.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index 2d6849e1..a5424958 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -24,6 +24,8 @@
#define _MAX(a,b) (((a)>(b))?(a):(b))
#ifndef PARSER
+#undef MIN
+#undef MAX
#define MIN(a,b) _MIN(a,b)
#define MAX(a,b) _MAX(a,b)
#endif
diff --git a/lib/printf.c b/lib/printf.c
index d8600b61..41e1cc0d 100644
--- a/lib/printf.c
+++ b/lib/printf.c
@@ -276,7 +276,7 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
ip_ntox(va_arg(args, ip_addr), ipbuf);
else {
ip_ntop(va_arg(args, ip_addr), ipbuf);
- if (field_width > 0)
+ if (field_width == 1)
field_width = STD_ADDRESS_P_LENGTH;
}
s = ipbuf;