diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 3ba073a390d0..088912239783 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -648,10 +648,8 @@ main(argc, argv) fd_set rfds; check_status(); - if (s >= FD_SETSIZE) { - (void)fprintf(stderr, "descriptor too large"); - exit(EX_OSERR); - } + if (s >= FD_SETSIZE) + errx(EX_OSERR, "descriptor too large"); FD_ZERO(&rfds); FD_SET(s, &rfds); (void)gettimeofday(&now, NULL);