Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Replace dead conditional by assert.
details: https://anonhg.NetBSD.org/src/rev/b188f916109c
branches: trunk
changeset: 352984:b188f916109c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Apr 16 20:59:04 2017 +0000
description:
Replace dead conditional by assert.
CID 975995
diffstat:
usr.bin/make/cond.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r a052ef4294d6 -r b188f916109c usr.bin/make/cond.c
--- a/usr.bin/make/cond.c Sun Apr 16 20:57:14 2017 +0000
+++ b/usr.bin/make/cond.c Sun Apr 16 20:59:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.74 2016/02/18 18:29:14 christos Exp $ */
+/* $NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.74 2016/02/18 18:29:14 christos Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
#else
-__RCSID("$NetBSD: cond.c,v 1.74 2016/02/18 18:29:14 christos Exp $");
+__RCSID("$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $");
#endif
#endif /* not lint */
#endif
@@ -91,6 +91,7 @@
*
*/
+#include <assert.h>
#include <ctype.h>
#include <errno.h> /* For strtoul() error checking */
@@ -1174,8 +1175,9 @@
break;
dflt_info = info;
}
+ assert(info != NULL);
- if_info = info != NULL ? info : ifs + 4;
+ if_info = info;
condExpr = line;
condPushBack = TOK_NONE;
Home |
Main Index |
Thread Index |
Old Index