summaryrefslogtreecommitdiff
path: root/usr.bin/signify/signify.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-03-05 22:55:08 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-03-05 22:55:08 +0000
commit20fc2491169e71122b63b88a8b8c703f64802aa0 (patch)
treed118f2f13050895a89521099c4d0a3d029c7a26a /usr.bin/signify/signify.c
parent205402488c16d04520624176950ae38a6b64e5dc (diff)
tighten up code a little
Diffstat (limited to 'usr.bin/signify/signify.c')
-rw-r--r--usr.bin/signify/signify.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index 752c0af8b35..f6b3ace261d 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.43 2014/03/05 22:53:36 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.44 2014/03/05 22:55:07 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -126,10 +126,8 @@ readall(int fd, void *buf, size_t len, const char *filename)
x = read(fd, buf, len);
if (x == -1)
err(1, "read from %s", filename);
- else {
- len -= x;
- buf = (char*)buf + x;
- }
+ len -= x;
+ buf = (char*)buf + x;
}
}
@@ -212,10 +210,8 @@ writeall(int fd, const void *buf, size_t len, const char *filename)
x = write(fd, buf, len);
if (x == -1)
err(1, "write to %s", filename);
- else {
- len -= x;
- buf = (char*)buf + x;
- }
+ len -= x;
+ buf = (char*)buf + x;
}
}