X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=support%2Fsdk%2Fc%2Fblip%2Fdriver%2Fnwstate.c;h=822b2551ccd918bfb1c11a1c45e300119edef1f3;hb=77903b7e197674c8535b06600eb98ee594a20ded;hp=7a08edebe68608537e38a2b08217433577e224cf;hpb=474eb733ac8253bbbe3b7bf22ac9f6d24424554e;p=tinyos-2.x.git diff --git a/support/sdk/c/blip/driver/nwstate.c b/support/sdk/c/blip/driver/nwstate.c index 7a08edeb..822b2551 100644 --- a/support/sdk/c/blip/driver/nwstate.c +++ b/support/sdk/c/blip/driver/nwstate.c @@ -132,8 +132,13 @@ void nw_print_links(int fd, int argc, char **argv) { router_t *r; link_t *l; - if (argc == 2) - target = atoi(argv[1]); + if (argc == 2) { + if (sscanf(argv[1], "%i", &target) == 0) { + VTY_printf("invalid node\r\n"); + VTY_flush(); + return; + } + } for (r = router_list; r != NULL; r = r->next) { char flags[16]; int pos = 0;