Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: rename clst to case_labels
details: https://anonhg.NetBSD.org/src/rev/ddb470c7856f
branches: trunk
changeset: 960555:ddb470c7856f
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Mar 21 10:08:01 2021 +0000
description:
lint: rename clst to case_labels
No functional change.
diffstat:
usr.bin/xlint/lint1/func.c | 22 +++++++++++-----------
usr.bin/xlint/lint1/lint1.h | 12 ++++++------
2 files changed, 17 insertions(+), 17 deletions(-)
diffs (121 lines):
diff -r e69a451546b6 -r ddb470c7856f usr.bin/xlint/lint1/func.c
--- a/usr.bin/xlint/lint1/func.c Sun Mar 21 09:54:02 2021 +0000
+++ b/usr.bin/xlint/lint1/func.c Sun Mar 21 10:08:01 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.78 2021/03/20 16:16:32 rillig Exp $ */
+/* $NetBSD: func.c,v 1.79 2021/03/21 10:08:01 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: func.c,v 1.78 2021/03/20 16:16:32 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.79 2021/03/21 10:08:01 rillig Exp $");
#endif
#include <stdlib.h>
@@ -170,7 +170,7 @@
popctrl(int env)
{
cstk_t *ci;
- clst_t *cl, *next;
+ case_label_t *cl, *next;
lint_assert(cstmt != NULL);
lint_assert(cstmt->c_env == env);
@@ -178,7 +178,7 @@
ci = cstmt;
cstmt = ci->c_surrounding;
- for (cl = ci->c_clst; cl != NULL; cl = next) {
+ for (cl = ci->c_case_labels; cl != NULL; cl = next) {
next = cl->cl_next;
free(cl);
}
@@ -447,7 +447,7 @@
static void
check_case_label(tnode_t *tn, cstk_t *ci)
{
- clst_t *cl;
+ case_label_t *cl;
val_t *v;
val_t nv;
tspec_t t;
@@ -498,7 +498,7 @@
free(v);
/* look if we had this value already */
- for (cl = ci->c_clst; cl != NULL; cl = cl->cl_next) {
+ for (cl = ci->c_case_labels; cl != NULL; cl = cl->cl_next) {
if (cl->cl_val.v_quad == nv.v_quad)
break;
}
@@ -515,10 +515,10 @@
* append the value to the list of
* case values
*/
- cl = xcalloc(1, sizeof (clst_t));
+ cl = xcalloc(1, sizeof *cl);
cl->cl_val = nv;
- cl->cl_next = ci->c_clst;
- ci->c_clst = cl;
+ cl->cl_next = ci->c_case_labels;
+ ci->c_case_labels = cl;
}
}
@@ -694,7 +694,7 @@
{
int nenum = 0, nclab = 0;
sym_t *esym;
- clst_t *cl;
+ case_label_t *cl;
lint_assert(cstmt->c_swtype != NULL);
@@ -710,7 +710,7 @@
esym != NULL; esym = esym->s_next) {
nenum++;
}
- for (cl = cstmt->c_clst; cl != NULL; cl = cl->cl_next)
+ for (cl = cstmt->c_case_labels; cl != NULL; cl = cl->cl_next)
nclab++;
if (hflag && eflag && nenum != nclab && !cstmt->c_default) {
/* enumeration value(s) not handled in switch */
diff -r e69a451546b6 -r ddb470c7856f usr.bin/xlint/lint1/lint1.h
--- a/usr.bin/xlint/lint1/lint1.h Sun Mar 21 09:54:02 2021 +0000
+++ b/usr.bin/xlint/lint1/lint1.h Sun Mar 21 10:08:01 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.76 2021/03/20 13:00:43 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.77 2021/03/21 10:08:01 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@@ -370,12 +370,12 @@
} pqinf_t;
/*
- * Case values are stored in a list of type clst_t.
+ * Case values are stored in a list of type case_label_t.
*/
-typedef struct clst {
+typedef struct case_label {
val_t cl_val;
- struct clst *cl_next;
-} clst_t;
+ struct case_label *cl_next;
+} case_label_t;
/*
* Used to keep information about nested control statements.
@@ -393,7 +393,7 @@
bool c_had_return_noval : 1; /* had "return;" */
bool c_had_return_value : 1; /* had "return (e);" */
type_t *c_swtype; /* type of switch expression */
- clst_t *c_clst; /* list of case values */
+ case_label_t *c_case_labels; /* list of case values */
struct mbl *c_fexprm; /* saved memory for end of loop
expression in for() */
tnode_t *c_f3expr; /* end of loop expr in for() */
Home |
Main Index |
Thread Index |
Old Index