summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/rwall/rwall.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/rwall/rwall.c b/usr.bin/rwall/rwall.c
index f40aa66..ea5f77e 100644
--- a/usr.bin/rwall/rwall.c
+++ b/usr.bin/rwall/rwall.c
@@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-
-__FBSDID("$FreeBSD$");
-
#ifndef lint
static const char copyright[] =
"@(#) Copyright (c) 1988 Regents of the University of California.\n\
@@ -46,6 +42,9 @@ static const char copyright[] =
static const char sccsid[] = "from: @(#)wall.c 5.14 (Berkeley) 3/2/91";
#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
/*
* This program is not related to David Wall, whose Stanford Ph.D. thesis
* is entitled "Mechanisms for Broadcast and Selective Broadcast".
@@ -136,9 +135,7 @@ makemsg(const char *fname)
const char *whom;
snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP);
- fd = mkstemp(tmpname);
- fp = fdopen(fd, "r+");
- if (fd == -1 || !fp)
+ if ((fd = mkstemp(tmpname)) == -1 || (fp = fdopen(fd, "r+")) == NULL)
err(1, "can't open temporary file");
unlink(tmpname);
OpenPOWER on IntegriCloud