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 designator_pop_name to desi...



details:   https://anonhg.NetBSD.org/src/rev/529165c81ead
branches:  trunk
changeset: 981738:529165c81ead
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Mar 19 17:37:57 2021 +0000

description:
lint: rename designator_pop_name to designator_shift_name

The entries are removed from the beginning, not from the end.

No functional change.

diffstat:

 usr.bin/xlint/lint1/init.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r d35ec4026788 -r 529165c81ead usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Fri Mar 19 10:23:34 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Fri Mar 19 17:37:57 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.104 2021/03/19 01:02:52 rillig Exp $        */
+/*     $NetBSD: init.c,v 1.105 2021/03/19 17:37:57 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.104 2021/03/19 01:02:52 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.105 2021/03/19 17:37:57 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -378,7 +378,7 @@
 }
 
 static void
-designator_pop_name(void)
+designator_shift_name(void)
 {
        debug_step("%s: %s %p", __func__, namedmem->n_name, namedmem);
        if (namedmem->n_next == namedmem) {
@@ -456,7 +456,7 @@
                        /* XXX: why ++? */
                        istk->i_remaining++;
                        /* XXX: why is i_seen_named_member not set? */
-                       designator_pop_name();
+                       designator_shift_name();
                        return;
                }
        }
@@ -464,7 +464,7 @@
        /* undefined struct/union member: %s */
        error(101, namedmem->n_name);
 
-       designator_pop_name();
+       designator_shift_name();
        istk->i_seen_named_member = true;
 }
 
@@ -656,7 +656,7 @@
                istk->i_subt = m->s_type;
                istk->i_seen_named_member = true;
                debug_step("named member '%s'", namedmem->n_name);
-               designator_pop_name();
+               designator_shift_name();
                cnt = istk->i_type->t_tspec == STRUCT ? 2 : 1;
        }
        istk->i_brace = true;



Home | Main Index | Thread Index | Old Index