From dfd132563e50e707464d0246dbdc9ef92be5b5d9 Mon Sep 17 00:00:00 2001 From: Florian Obser Date: Tue, 4 Jul 2017 15:43:39 +0000 Subject: replace perror(3) with err(3); from Klemens Nanni --- sbin/ping/ping.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 8592d7d539f..0428dde6606 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.218 2017/02/22 13:43:35 renato Exp $ */ +/* $OpenBSD: ping.c,v 1.219 2017/07/04 15:43:38 florian Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -729,10 +729,8 @@ main(int argc, char *argv[]) rspace[IPOPT_OLEN] = sizeof(rspace)-1; rspace[IPOPT_OFFSET] = IPOPT_MINOFF; if (setsockopt(s, IPPROTO_IP, IP_OPTIONS, rspace, - sizeof(rspace)) < 0) { - perror("ping: record route"); - exit(1); - } + sizeof(rspace)) < 0) + err(1, "record route"); } if ((moptions & MULTICAST_NOLOOP) && -- cgit v1.2.3