Module Name: src
Committed By: joerg
Date: Wed Jan 15 10:13:25 UTC 2014
Modified Files:
src/sbin/rndctl: rndctl.c
Log Message:
Fix arguments for write.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/rndctl/rndctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/rndctl/rndctl.c
diff -u src/sbin/rndctl/rndctl.c:1.25 src/sbin/rndctl/rndctl.c:1.26
--- src/sbin/rndctl/rndctl.c:1.25 Tue Aug 14 14:41:07 2012
+++ src/sbin/rndctl/rndctl.c Wed Jan 15 10:13:25 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rndctl.c,v 1.25 2012/08/14 14:41:07 jruoho Exp $ */
+/* $NetBSD: rndctl.c,v 1.26 2014/01/15 10:13:25 joerg Exp $ */
/*-
* Copyright (c) 1997 Michael Graff.
@@ -33,7 +33,7 @@
#include <sha1.h>
#ifndef lint
-__RCSID("$NetBSD: rndctl.c,v 1.25 2012/08/14 14:41:07 jruoho Exp $");
+__RCSID("$NetBSD: rndctl.c,v 1.26 2014/01/15 10:13:25 joerg Exp $");
#endif
@@ -203,9 +203,8 @@ do_load(const char *const filename)
}
memset(&rszero, 0, sizeof(rszero));
- if (write(fd, &rszero, sizeof(rszero) != sizeof(rszero))) {
+ if (write(fd, &rszero, sizeof(rszero)) != sizeof(rszero))
err(1, "overwrite");
- }
fsync_range(fd, FDATASYNC|FDISKSYNC, (off_t)0, (off_t)0);
close(fd);