diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-03-20 09:26:43 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-03-20 09:26:43 +0000 |
commit | 75a7e046e7dba2363497efaa11c8f99b939a7560 (patch) | |
tree | 7fd9e810fd2884ddaea942f5dad27593bf074407 | |
parent | b64e44b3824158ba1294bdff2fd85cdf710aa11f (diff) |
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@
-rw-r--r-- | usr.bin/rsync/sender.c | 8 |
1 files changed, 5 insertions, 3 deletions
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 <kristaps@bsd.lv> * @@ -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; } |