Module Name:    src
Committed By:   rillig
Date:           Sun Apr 18 17:47:33 UTC 2021

Modified Files:
        src/usr.bin/xlint/common: tyname.c
        src/usr.bin/xlint/lint1: lint1.h tree.c

Log Message:
lint: remove redundant CONSTCOND

In do-while-0 loops, these are no longer needed since tree.c 1.202 from
2021-01-31.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/xlint/common/tyname.c
cvs rdiff -u -r1.99 -r1.100 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.278 -r1.279 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/usr.bin/xlint/common/tyname.c
diff -u src/usr.bin/xlint/common/tyname.c:1.39 src/usr.bin/xlint/common/tyname.c:1.40
--- src/usr.bin/xlint/common/tyname.c:1.39	Sat Apr 10 18:36:27 2021
+++ src/usr.bin/xlint/common/tyname.c	Sun Apr 18 17:47:32 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $	*/
+/*	$NetBSD: tyname.c,v 1.40 2021/04/18 17:47:32 rillig Exp $	*/
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tyname.c,v 1.39 2021/04/10 18:36:27 rillig Exp $");
+__RCSID("$NetBSD: tyname.c,v 1.40 2021/04/18 17:47:32 rillig Exp $");
 #endif
 
 #include <limits.h>
@@ -54,7 +54,7 @@ __RCSID("$NetBSD: tyname.c,v 1.39 2021/0
 	do { \
 		(void)warnx("%s, %d: " fmt, __FILE__, __LINE__, ##args); \
 		abort(); \
-	} while (/*CONSTCOND*/false)
+	} while (false)
 #endif
 
 /* A tree of strings. */

Index: src/usr.bin/xlint/lint1/lint1.h
diff -u src/usr.bin/xlint/lint1/lint1.h:1.99 src/usr.bin/xlint/lint1/lint1.h:1.100
--- src/usr.bin/xlint/lint1/lint1.h:1.99	Sun Apr 18 10:09:49 2021
+++ src/usr.bin/xlint/lint1/lint1.h	Sun Apr 18 17:47:32 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.99 2021/04/18 10:09:49 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.100 2021/04/18 17:47:32 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -76,7 +76,7 @@ typedef struct {
 		curr_pos.p_uniq++;					\
 		if (curr_pos.p_file == csrc_pos.p_file)			\
 			csrc_pos.p_uniq++;				\
-	} while (/*CONSTCOND*/false)
+	} while (false)
 
 /*
  * Strings cannot be referenced to simply by a pointer to its first
@@ -456,7 +456,7 @@ typedef	struct err_set {
 	do {								\
 		if (!(cond))						\
 			assert_failed(__FILE__, __LINE__, __func__, #cond); \
-	} while (/*CONSTCOND*/false)
+	} while (false)
 
 #ifdef BLKDEBUG
 #define ZERO	0xa5
@@ -480,7 +480,7 @@ check_printf(const char *fmt, ...)
 	do {								\
 		check_printf(__CONCAT(MSG_, msgid), ##args);		\
 		(func)(msgid, pos, ##args);				\
-	} while (/*CONSTCOND*/false)
+	} while (false)
 
 #  define error_at(msgid, pos, args...) \
 	wrap_check_printf_at(error_at, msgid, pos, ##args)
@@ -493,7 +493,7 @@ check_printf(const char *fmt, ...)
 	do {								\
 		check_printf(__CONCAT(MSG_, msgid), ##args);		\
 		(func)(msgid, ##args);					\
-	} while (/*CONSTCOND*/false)
+	} while (false)
 
 #  define error(msgid, args...) wrap_check_printf(error, msgid, ##args)
 #  define warning(msgid, args...) wrap_check_printf(warning, msgid, ##args)

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.278 src/usr.bin/xlint/lint1/tree.c:1.279
--- src/usr.bin/xlint/lint1/tree.c:1.278	Sun Apr 18 09:53:03 2021
+++ src/usr.bin/xlint/lint1/tree.c	Sun Apr 18 17:47:32 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.278 2021/04/18 09:53:03 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.279 2021/04/18 17:47:32 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.278 2021/04/18 09:53:03 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.279 2021/04/18 17:47:32 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -4154,7 +4154,7 @@ cat_strings(strg_t *strg1, strg_t *strg2
 	strg1->F = xrealloc(strg1->F, len * sizeof(*strg1->F)); \
 	(void)memcpy(strg1->F + len1, strg2->F, len2 * sizeof(*strg1->F)); \
 	free(strg2->F); \
-    } while (/*CONSTCOND*/false)
+    } while (false)
 
 	if (strg1->st_tspec == CHAR)
 		COPY(st_cp);

Reply via email to