Module Name: src
Committed By: christos
Date: Fri Nov 18 20:39:18 UTC 2011
Modified Files:
src/lib/libedit: history.c map.c
Log Message:
Add coverity annotations about unreachable code (Kamil Dudka)
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/lib/libedit/history.c
cvs rdiff -u -r1.30 -r1.31 src/lib/libedit/map.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libedit/history.c
diff -u src/lib/libedit/history.c:1.45 src/lib/libedit/history.c:1.46
--- src/lib/libedit/history.c:1.45 Fri Jul 29 19:44:44 2011
+++ src/lib/libedit/history.c Fri Nov 18 15:39:18 2011
@@ -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 @@ history_set_fun(TYPE(History) *h, TYPE(H
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;
Index: src/lib/libedit/map.c
diff -u src/lib/libedit/map.c:1.30 src/lib/libedit/map.c:1.31
--- src/lib/libedit/map.c:1.30 Tue Aug 16 12:25:15 2011
+++ src/lib/libedit/map.c Fri Nov 18 15:39:18 2011
@@ -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 @@ map_bind(EditLine *el, int argc, const C
}
break;
+ /* coverity[dead_error_begin] */
default:
EL_ABORT((el->el_errfile, "Bad XK_ type %d\n", ntype));
break;