Module Name:    src
Committed By:   kre
Date:           Tue Oct 29 11:30:20 UTC 2024

Modified Files:
        src/usr.bin/ctags: ctags.c

Log Message:
PR bin/58786 - fix exit status when tags file open fails

>From RVP ... always exit(1) when opening new tags file fails.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.bin/ctags/ctags.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ctags/ctags.c
diff -u src/usr.bin/ctags/ctags.c:1.15 src/usr.bin/ctags/ctags.c:1.16
--- src/usr.bin/ctags/ctags.c:1.15	Sat Feb 10 08:36:03 2024
+++ src/usr.bin/ctags/ctags.c	Tue Oct 29 11:30:20 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctags.c,v 1.15 2024/02/10 08:36:03 andvar Exp $	*/
+/*	$NetBSD: ctags.c,v 1.16 2024/10/29 11:30:20 kre Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)ctags.c	8.4 (Berkeley) 2/7/95";
 #endif
-__RCSID("$NetBSD: ctags.c,v 1.15 2024/02/10 08:36:03 andvar Exp $");
+__RCSID("$NetBSD: ctags.c,v 1.16 2024/10/29 11:30:20 kre Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -167,7 +167,7 @@ usage:		(void)fprintf(stderr,
 				++aflag;
 			}
 			if (!(outf = fopen(outfile, aflag ? "a" : "w")))
-				err(exit_val, "%s", outfile);
+				err(EXIT_FAILURE, "%s", outfile);
 			put_entries(head);
 			(void)fclose(outf);
 			if (uflag) {

Reply via email to