summaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-09-02 16:16:23 +0000
committerDenis Vlasenko2006-09-02 16:16:23 +0000
commitdb7f2e5881b9ae40896d7660cd2f2446f514c72d (patch)
tree302ceaf4aabb508dc8a772989fa1151f0406663b /networking/ping.c
parentcb6874cc66df69fe49c65338a67fec1206d02c4b (diff)
downloadbusybox-db7f2e5881b9ae40896d7660cd2f2446f514c72d.zip
busybox-db7f2e5881b9ae40896d7660cd2f2446f514c72d.tar.gz
ping6: resolve interface name to number early.
gcc is more efficient at truncating int to int16 via cast, use that instead of &.
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 8ccb7e0..967a3e3 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -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;
}