From bca13417c816aea1ab18f9563e65bb5fa908ba49 Mon Sep 17 00:00:00 2001 From: dlg Date: Wed, 13 Aug 2014 01:00:16 +0000 Subject: [PATCH] setsockopt sets errno on failure, so we can use err instead of errx when handling the error. --- usr.sbin/tftpd/tftpd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c index e08efc50363..49c7b363433 100644 --- a/usr.sbin/tftpd/tftpd.c +++ b/usr.sbin/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.19 2014/04/21 04:02:52 dlg Exp $ */ +/* $OpenBSD: tftpd.c,v 1.20 2014/08/13 01:00:16 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -530,12 +530,12 @@ tftpd_listen(const char *addr, const char *port, int family) case AF_INET: if (setsockopt(s, IPPROTO_IP, IP_RECVDSTADDR, &on, sizeof(on)) == -1) - errx(1, "setsockopt(IP_RECVDSTADDR)"); + err(1, "setsockopt(IP_RECVDSTADDR)"); break; case AF_INET6: if (setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)) == -1) - errx(1, "setsockopt(IPV6_RECVPKTINFO)"); + err(1, "setsockopt(IPV6_RECVPKTINFO)"); break; } -- 2.20.1