diff options
Diffstat (limited to 'ripd/rip_routemap.c')
-rw-r--r-- | ripd/rip_routemap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ripd/rip_routemap.c b/ripd/rip_routemap.c index 7d39023b3..ad9f8cf80 100644 --- a/ripd/rip_routemap.c +++ b/ripd/rip_routemap.c @@ -421,8 +421,7 @@ static void *route_set_metric_compile(const char *arg) /* Convert string to integer. */ metric = strtol(pnt, &endptr, 10); - if (*endptr != '\0' || mod->metric < 0) { - metric = 0; + if (*endptr != '\0' || metric < 0) { return mod; } if (metric > RIP_METRIC_INFINITY) { |