Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/nvi/dist/common Fix compiler error caused by la...
details: https://anonhg.NetBSD.org/src/rev/d67fbbbeb478
branches: trunk
changeset: 791665:d67fbbbeb478
user: tron <tron%NetBSD.org@localhost>
date: Wed Nov 27 20:31:01 2013 +0000
description:
Fix compiler error caused by last change:
db_env_create() returns an integer. So we must not compare its return
value with NULL.
diffstat:
external/bsd/nvi/dist/common/exf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 2cbbee7ea1bd -r d67fbbbeb478 external/bsd/nvi/dist/common/exf.c
--- a/external/bsd/nvi/dist/common/exf.c Wed Nov 27 20:27:58 2013 +0000
+++ b/external/bsd/nvi/dist/common/exf.c Wed Nov 27 20:31:01 2013 +0000
@@ -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 @@
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");
Home |
Main Index |
Thread Index |
Old Index