Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Add coverity annotations about unreachable code ...
details: https://anonhg.NetBSD.org/src/rev/b38122264ad5
branches: trunk
changeset: 771302:b38122264ad5
user: christos <christos%NetBSD.org@localhost>
date: Fri Nov 18 20:39:18 2011 +0000
description:
Add coverity annotations about unreachable code (Kamil Dudka)
diffstat:
lib/libedit/history.c | 7 ++++---
lib/libedit/map.c | 5 +++--
2 files changed, 7 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r 5068550f0e81 -r b38122264ad5 lib/libedit/history.c
--- a/lib/libedit/history.c Fri Nov 18 20:38:42 2011 +0000
+++ b/lib/libedit/history.c Fri Nov 18 20:39:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: history.c,v 1.45 2011/07/29 23:44:44 christos Exp $ */
+/* $NetBSD: history.c,v 1.46 2011/11/18 20:39:18 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: history.c,v 1.45 2011/07/29 23:44:44 christos Exp $");
+__RCSID("$NetBSD: history.c,v 1.46 2011/11/18 20:39:18 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -689,7 +689,8 @@
nh->h_enter == NULL || nh->h_add == NULL || nh->h_clear == NULL ||
nh->h_del == NULL || nh->h_ref == NULL) {
if (h->h_next != history_def_next) {
- history_def_init(&h->h_ref, &ev, 0);
+ if (history_def_init(&h->h_ref, &ev, 0) == -1)
+ return -1;
h->h_first = history_def_first;
h->h_next = history_def_next;
h->h_last = history_def_last;
diff -r 5068550f0e81 -r b38122264ad5 lib/libedit/map.c
--- a/lib/libedit/map.c Fri Nov 18 20:38:42 2011 +0000
+++ b/lib/libedit/map.c Fri Nov 18 20:39:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map.c,v 1.30 2011/08/16 16:25:15 christos Exp $ */
+/* $NetBSD: map.c,v 1.31 2011/11/18 20:39:18 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: map.c,v 1.30 2011/08/16 16:25:15 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.31 2011/11/18 20:39:18 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -1380,6 +1380,7 @@
}
break;
+ /* coverity[dead_error_begin] */
default:
EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ntype));
break;
Home |
Main Index |
Thread Index |
Old Index