summaryrefslogtreecommitdiff
path: root/lib/vty.h
diff options
context:
space:
mode:
authorAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-09 00:25:15 -0700
committerAvneesh Sachdev <avneesh@opensourcerouting.org>2012-04-09 00:25:15 -0700
commit3cf6c2b4e43f44a977d218c96c26250654ae333e (patch)
treee017cde2015fbf3ef6c250327428d7c6152aa8f7 /lib/vty.h
parent01d7ff0a2166a422c56bd26f04fc22832a9e690b (diff)
parente96b312150d8e376c1ef463793d1929eca3618d5 (diff)
Merge branch 'quagga' into google-bgp-multipath
Conflicts: bgpd/bgp_route.c
Diffstat (limited to 'lib/vty.h')
-rw-r--r--lib/vty.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vty.h b/lib/vty.h
index 7df04b5f..639d7417 100644
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -152,8 +152,9 @@ struct vty
#define VTY_GET_LONG(NAME,V,STR) \
do { \
char *endptr = NULL; \
+ errno = 0; \
(V) = strtoul ((STR), &endptr, 10); \
- if (*endptr != '\0' || (V) == ULONG_MAX) \
+ if (*(STR) == '-' || *endptr != '\0' || errno) \
{ \
vty_out (vty, "%% Invalid %s value%s", NAME, VTY_NEWLINE); \
return CMD_WARNING; \