summaryrefslogtreecommitdiffstats
path: root/usr.bin/rsync/uploader.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2019-02-17 16:34:04 +0000
committerderaadt <deraadt@openbsd.org>2019-02-17 16:34:04 +0000
commited5cc9fb65554c411b22b9b62d81b191822f9903 (patch)
tree055d446254dd99999445874d863fbf28fdf73658 /usr.bin/rsync/uploader.c
parentcleanup protocl warning, and return exit code upwards. (diff)
downloadwireguard-openbsd-ed5cc9fb65554c411b22b9b62d81b191822f9903.tar.xz
wireguard-openbsd-ed5cc9fb65554c411b22b9b62d81b191822f9903.zip
more yoda repairs
Diffstat (limited to 'usr.bin/rsync/uploader.c')
-rw-r--r--usr.bin/rsync/uploader.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c
index 878b9a35c9e..6f7c6dbd509 100644
--- a/usr.bin/rsync/uploader.c
+++ b/usr.bin/rsync/uploader.c
@@ -1,4 +1,4 @@
-/* $Id: uploader.c,v 1.13 2019/02/16 16:56:33 florian Exp $ */
+/* $Id: uploader.c,v 1.14 2019/02/17 16:34:04 deraadt Exp $ */
/*
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2019 Florian Obser <florian@openbsd.org>
@@ -732,7 +732,7 @@ rsync_uploader(struct upload *u, int *fileinfd,
*/
if (u->state == UPLOAD_WRITE_LOCAL) {
- assert(NULL != u->buf);
+ assert(u->buf != NULL);
assert(*fileoutfd != -1);
assert(*fileinfd == -1);
@@ -823,8 +823,8 @@ rsync_uploader(struct upload *u, int *fileinfd,
/* Go back to the event loop, if necessary. */
- u->state = -1 == *fileinfd ?
- UPLOAD_WRITE_LOCAL : UPLOAD_READ_LOCAL;
+ u->state = (*fileinfd == -1) ?
+ UPLOAD_WRITE_LOCAL : UPLOAD_READ_LOCAL;
if (u->state == UPLOAD_READ_LOCAL)
return 1;
}