From 8af0dd1f5671c756d580b7927dc14ad846362b4a Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Wed, 16 May 2007 09:52:48 +0000 Subject: open() returns -1 on error, not NULL. From Tobias Stoeckmann. --- usr.bin/cvs/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin/cvs/client.c') diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c index 6334b347c24..336f3823d14 100644 --- a/usr.bin/cvs/client.c +++ b/usr.bin/cvs/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.59 2007/02/22 06:42:09 otto Exp $ */ +/* $OpenBSD: client.c,v 1.60 2007/05/16 09:52:47 xsa Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -957,7 +957,7 @@ cvs_client_initlog(void) } if ((cvs_client_inlog_fd = open(fpath, - O_RDWR | O_CREAT | O_TRUNC, 0644)) == NULL) { + O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1) { fatal("cvs_client_initlog: open `%s': %s", fpath, strerror(errno)); } @@ -976,7 +976,7 @@ cvs_client_initlog(void) } if ((cvs_client_outlog_fd = open(fpath, - O_RDWR | O_CREAT | O_TRUNC, 0644)) == NULL) { + O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1) { fatal("cvs_client_initlog: open `%s': %s", fpath, strerror(errno)); } -- cgit v1.2.3