Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/wall PR/7664: David Holand: bogus check for mkstemp(...
details: https://anonhg.NetBSD.org/src/rev/0f44b64fe7af
branches: trunk
changeset: 473340:0f44b64fe7af
user: christos <christos%NetBSD.org@localhost>
date: Sat May 29 21:10:43 1999 +0000
description:
PR/7664: David Holand: bogus check for mkstemp() return code.
diffstat:
usr.bin/wall/wall.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r d8b0ca798191 -r 0f44b64fe7af usr.bin/wall/wall.c
--- a/usr.bin/wall/wall.c Sat May 29 20:44:20 1999 +0000
+++ b/usr.bin/wall/wall.c Sat May 29 21:10:43 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wall.c,v 1.11 1998/07/26 23:15:38 mycroft Exp $ */
+/* $NetBSD: wall.c,v 1.12 1999/05/29 21:10:43 christos Exp $ */
/*
* Copyright (c) 1988, 1990, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93";
#endif
-__RCSID("$NetBSD: wall.c,v 1.11 1998/07/26 23:15:38 mycroft Exp $");
+__RCSID("$NetBSD: wall.c,v 1.12 1999/05/29 21:10:43 christos Exp $");
#endif /* not lint */
/*
@@ -142,7 +142,7 @@
char *p, hostname[MAXHOSTNAMELEN+1], lbuf[100], tmpname[15];
(void)snprintf(tmpname, sizeof tmpname, "%s/wall.XXXXXX", _PATH_TMP);
- if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+")))
+ if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+")))
err(1, "can't open temporary file");
(void)unlink(tmpname);
Home |
Main Index |
Thread Index |
Old Index