Commit facf8d6c authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Allow -n infinity.

parent 7b3873c6
...@@ -137,7 +137,10 @@ main(int argc, char **argv) ...@@ -137,7 +137,10 @@ main(int argc, char **argv)
if(rc < 0) if(rc < 0)
goto syntax; goto syntax;
SHIFTE(); SHIFTE();
myxroutes[nummyxroutes].cost = atoi(*arg); if(strcmp(*arg, "infinity") == 0)
myxroutes[nummyxroutes].cost = INFINITY;
else
myxroutes[nummyxroutes].cost = atoi(*arg);
if(myxroutes[nummyxroutes].cost < 0 || if(myxroutes[nummyxroutes].cost < 0 ||
myxroutes[nummyxroutes].cost > INFINITY) myxroutes[nummyxroutes].cost > INFINITY)
goto syntax; goto syntax;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment