summaryrefslogtreecommitdiff
path: root/contrib/binlog.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-01-13 09:49:01 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-01-13 09:49:01 -0500
commitc93c46f0c10e56b52d3c980e7082ab74f7003f66 (patch)
tree2bfb119832f8a0deef0c9e0ce2d8ad3c76de5949 /contrib/binlog.c
parent52d4e56c518adf59c3469b1d79eda7e4f56e7f5f (diff)
downloadgpsd-c93c46f0c10e56b52d3c980e7082ab74f7003f66.tar.gz
Warning cleanups.
Diffstat (limited to 'contrib/binlog.c')
-rw-r--r--contrib/binlog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/binlog.c b/contrib/binlog.c
index 965c3fa0..1506be88 100644
--- a/contrib/binlog.c
+++ b/contrib/binlog.c
@@ -3,6 +3,7 @@
*/
#include <sys/types.h>
#include <err.h>
+#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
@@ -59,7 +60,7 @@ int main(int argc, char **argv) {
while (1){
l = read(ifd, buf, BUFSIZ);
if (l > 0)
- write(ofd, buf, l);
+ assert(write(ofd, buf, l) > 0);
usleep(1000);
bzero(buf, BUFSIZ);
spinner( n++ );