On 2/20/18 2:37 PM, Serhey Popovych wrote: > diff --git a/ip/ipneigh.c b/ip/ipneigh.c > index 0735424..9c9cd23 100644 > --- a/ip/ipneigh.c > +++ b/ip/ipneigh.c > @@ -178,11 +178,13 @@ static int ipneigh_modify(int cmd, int flags, int argc, > char **argv) > > ll_init_map(&rth); > > - if (dev && (req.ndm.ndm_ifindex = ll_name_to_index(dev)) == 0) { > - fprintf(stderr, "Cannot find device \"%s\"\n", dev); > - return -1; > + if (dev) { > + req.ndm.ndm_ifindex = ll_name_to_index(dev); > + if (!req.ndm.ndm_ifindex) > + return nodev(dev); > } > > + > if (rtnl_talk(&rth, &req.n, NULL) < 0) > exit(2); >
Remove the extra newline