From: yasuoka Date: Sat, 12 Jul 2014 19:34:31 +0000 (+0000) Subject: Fix error in previous. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=74d2d36c8736bcaf133d5001a21eddd84795c610;p=openbsd Fix error in previous. --- diff --git a/usr.sbin/npppd/npppd/privsep.c b/usr.sbin/npppd/npppd/privsep.c index c1bf824945b..6977644a2ac 100644 --- a/usr.sbin/npppd/npppd/privsep.c +++ b/usr.sbin/npppd/npppd/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.10 2014/07/12 14:04:18 yasuoka Exp $ */ +/* $OpenBSD: privsep.c,v 1.11 2014/07/12 19:34:31 yasuoka Exp $ */ /* * Copyright (c) 2010 Yasuoka Masahiko @@ -542,11 +542,11 @@ privsep_common_resp(void) static void privsep_priv_main(int sock) { - struct imsgbuf imsg; + struct imsgbuf ibuf; - imsg_init(&imsg, sock); - privsep_priv_dispatch_imsg(&imsg); - imsg_clear(&imsg); + imsg_init(&ibuf, sock); + privsep_priv_dispatch_imsg(&ibuf); + imsg_clear(&ibuf); close(sock); exit(EXIT_SUCCESS); @@ -930,12 +930,12 @@ imsg_read_and_get(struct imsgbuf *ibuf, struct imsg *imsg) ssize_t n; for (;;) { - if ((n = imsg_read(&privsep_ibuf)) <= 0) { + if ((n = imsg_read(ibuf)) <= 0) { if (n == 0 && (errno == EAGAIN || errno == EINTR)) continue; return (-1); } - if ((n = imsg_get(&privsep_ibuf, imsg)) < 0) + if ((n = imsg_get(ibuf, imsg)) < 0) return (-1); if (n == 0) continue;