From: claudio Date: Wed, 20 Mar 2024 09:26:42 +0000 (+0000) Subject: Remove some else statements in if () else if () chains that don't need X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=81b5c8f98a2a1ff4a013450db6d29b7a72829fcd;p=openbsd Remove some else statements in if () else if () chains that don't need to be written this way. Makes the code more readable. OK tb@ --- diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c index 43ccfbd6467..c54fbc2dae0 100644 --- a/usr.bin/rsync/sender.c +++ b/usr.bin/rsync/sender.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sender.c,v 1.32 2024/02/27 11:28:30 claudio Exp $ */ +/* $OpenBSD: sender.c,v 1.33 2024/03/20 09:26:42 claudio Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -588,7 +588,8 @@ rsync_sender(struct sess *sess, int fdin, &up, &wbuf, &wbufsz, &wbufmax, fl)) { ERRX1("send_up_fsm"); goto out; - } else if (phase > 1) + } + if (phase > 1) break; } @@ -664,7 +665,8 @@ rsync_sender(struct sess *sess, int fdin, if (!io_read_int(sess, fdin, &idx)) { ERRX1("io_read_int"); goto out; - } else if (idx != -1) { + } + if (idx != -1) { ERRX("read incorrect update complete ack"); goto out; }