Module Name:    src
Committed By:   tron
Date:           Wed Nov 27 20:31:01 UTC 2013

Modified Files:
        src/external/bsd/nvi/dist/common: exf.c

Log Message:
Fix compiler error caused by last change:
db_env_create() returns an integer. So we must not compare its return
value with NULL.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/nvi/dist/common/exf.c

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

Modified files:

Index: src/external/bsd/nvi/dist/common/exf.c
diff -u src/external/bsd/nvi/dist/common/exf.c:1.4 src/external/bsd/nvi/dist/common/exf.c:1.5
--- src/external/bsd/nvi/dist/common/exf.c:1.4	Wed Nov 27 18:11:50 2013
+++ src/external/bsd/nvi/dist/common/exf.c	Wed Nov 27 20:31:01 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: exf.c,v 1.4 2013/11/27 18:11:50 christos Exp $ */
+/*	$NetBSD: exf.c,v 1.5 2013/11/27 20:31:01 tron Exp $ */
 /*-
  * Copyright (c) 1992, 1993, 1994
  *	The Regents of the University of California.  All rights reserved.
@@ -711,9 +711,9 @@ file_end(SCR *sp, EXF *ep, int force)
 
 		db_env_close(ep->env, 0);
 		ep->env = 0;
-		if ((sp->db_error = db_env_create(&env, 0)) != NULL)
+		if ((sp->db_error = db_env_create(&env, 0)) != 0)
 			msgq(sp, M_DBERR, "env_create");
-		if ((sp->db_error = db_env_remove(env, ep->env_path, 0)))
+		if ((sp->db_error = db_env_remove(env, ep->env_path, 0)) != 0)
 			msgq(sp, M_DBERR, "env->remove");
 		if (ep->env_path != NULL && rmdir(ep->env_path))
 			msgq_str(sp, M_SYSERR, ep->env_path, "242|%s: remove");

Reply via email to