Revert/fix the most controversial parts of the last commit:

1) place __FBSDID() correctly IAW style(9).

2) revert (and slightly correct) a "complex" expression in an if()
   statement.
This commit is contained in:
markm 2002-03-07 14:11:41 +00:00
parent 43cc55dd2f
commit c285f79bbb

View File

@ -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);