Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/usr.bin/fgen Pull up revision 1.17 (requested by bjh21 ...
details: https://anonhg.NetBSD.org/src/rev/cf1a64ea5fad
branches: netbsd-1-6
changeset: 527604:cf1a64ea5fad
user: tv <tv%NetBSD.org@localhost>
date: Wed May 29 16:25:20 2002 +0000
description:
Pull up revision 1.17 (requested by bjh21 in ticket #62):
When open(2) fails, it returns -1, not NULL.
diffstat:
usr.bin/fgen/fgen.l | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 4443ab265232 -r cf1a64ea5fad usr.bin/fgen/fgen.l
--- a/usr.bin/fgen/fgen.l Wed May 29 09:59:04 2002 +0000
+++ b/usr.bin/fgen/fgen.l Wed May 29 16:25:20 2002 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: fgen.l,v 1.16 2001/12/31 18:31:59 thorpej Exp $ */
+/* $NetBSD: fgen.l,v 1.16.2.1 2002/05/29 16:25:20 tv Exp $ */
/* FLEX input for FORTH input file scanner */
/*
* Copyright (c) 1998 Eduardo Horvath.
@@ -1059,7 +1059,7 @@
fheader->checksum += outbuf[i];
fheader->checksum = htons(fheader->checksum);
- if ((outf = open(outfile, O_WRONLY|O_CREAT|O_TRUNC, 0666)) == NULL)
+ if ((outf = open(outfile, O_WRONLY|O_CREAT|O_TRUNC, 0666)) == -1)
err(1, "can out open %s for writing", outfile);
if (write(outf, outbuf, outpos) != outpos) {
Home |
Main Index |
Thread Index |
Old Index