Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/makewhatis Fix incorrect error check after writing d...
details: https://anonhg.NetBSD.org/src/rev/4eeb19fb3629
branches: trunk
changeset: 476710:4eeb19fb3629
user: tron <tron%NetBSD.org@localhost>
date: Sat Sep 25 21:25:55 1999 +0000
description:
Fix incorrect error check after writing database file.
diffstat:
libexec/makewhatis/makewhatis.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 16afe6083c23 -r 4eeb19fb3629 libexec/makewhatis/makewhatis.c
--- a/libexec/makewhatis/makewhatis.c Sat Sep 25 21:19:48 1999 +0000
+++ b/libexec/makewhatis/makewhatis.c Sat Sep 25 21:25:55 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: makewhatis.c,v 1.1 1999/09/25 21:17:37 tron Exp $ */
+/* $NetBSD: makewhatis.c,v 1.2 1999/09/25 21:25:55 tron Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
#endif /* not lint */
#ifndef lint
-__RCSID("$NetBSD: makewhatis.c,v 1.1 1999/09/25 21:17:37 tron Exp $");
+__RCSID("$NetBSD: makewhatis.c,v 1.2 1999/09/25 21:25:55 tron Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -144,7 +144,7 @@
if ((out = fopen(whatisdb, "w")) == NULL)
errx(EXIT_FAILURE, "%s: %s", whatisdb, strerror(errno));
- if (!(dumpwhatis(out, dest) && (fclose(out) == 0)))
+ if (!(dumpwhatis(out, dest) || (fclose(out) < 0)))
errx(EXIT_FAILURE, "%s: %s", whatisdb, strerror(errno));
return EXIT_SUCCESS;
Home |
Main Index |
Thread Index |
Old Index