diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:12:36 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-11-21 13:12:36 +0000 |
commit | 3d390a8bbbfa60898c28bb458da47b91b54287a8 (patch) | |
tree | 60cc4955c806aaac6a075361457f0319a9e70a26 /usr.sbin/rpki-client/rsync.c | |
parent | f6c88a9535ada120880c3cc431d0bdf48df5be3f (diff) |
Convert msgbuf_write() callers to the new return logic.
OK tb@
Diffstat (limited to 'usr.sbin/rpki-client/rsync.c')
-rw-r--r-- | usr.sbin/rpki-client/rsync.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/rpki-client/rsync.c b/usr.sbin/rpki-client/rsync.c index ad4ce6f87f3..6fa439a4b57 100644 --- a/usr.sbin/rpki-client/rsync.c +++ b/usr.sbin/rpki-client/rsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsync.c,v 1.52 2024/11/14 10:28:59 tb Exp $ */ +/* $OpenBSD: rsync.c,v 1.53 2024/11/21 13:12:19 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -355,11 +355,11 @@ proc_rsync(char *prog, char *bind_addr, int fd) } if (pfd.revents & POLLOUT) { - switch (msgbuf_write(&msgq)) { - case 0: - errx(1, "write: connection closed"); - case -1: - err(1, "write"); + if (msgbuf_write(&msgq) == -1) { + if (errno == EPIPE) + errx(1, "write: connection closed"); + else + err(1, "write"); } } |