ping6: resolve interface name to number early.

gcc is more efficient at truncating int to int16
via cast, use that instead of &.
This commit is contained in:
Denis Vlasenko
2006-09-02 16:16:23 +00:00
parent cb6874cc66
commit db7f2e5881
2 changed files with 9 additions and 8 deletions

View File

@ -416,7 +416,7 @@ int ping_main(int argc, char **argv)
if (argc < 1)
bb_show_usage();
myid = getpid() & 0xFFFF;
myid = (int16_t) getpid();
ping(*argv);
return EXIT_SUCCESS;
}