Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint2 lint: expand the last remaining __arrayc...



details:   https://anonhg.NetBSD.org/src/rev/391fde6bd44b
branches:  trunk
changeset: 365732:391fde6bd44b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Apr 21 21:09:13 2022 +0000

description:
lint: expand the last remaining __arraycount

For consistency with the other expressions for an array length, which
already use the expanded form.

No functional change.

diffstat:

 usr.bin/xlint/lint2/chk.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 17f29b2ed5cb -r 391fde6bd44b usr.bin/xlint/lint2/chk.c
--- a/usr.bin/xlint/lint2/chk.c Thu Apr 21 19:48:18 2022 +0000
+++ b/usr.bin/xlint/lint2/chk.c Thu Apr 21 21:09:13 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chk.c,v 1.46 2021/11/16 22:12:44 rillig Exp $ */
+/* $NetBSD: chk.c,v 1.47 2022/04/21 21:09:13 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: chk.c,v 1.46 2021/11/16 22:12:44 rillig Exp $");
+__RCSID("$NetBSD: chk.c,v 1.47 2022/04/21 21:09:13 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -1084,15 +1084,16 @@
 
        if (def->s_function_has_return_value) {
                /*
-                * XXX as soon as we are able to disable single warnings
+                * XXX as soon as we are able to disable single warnings,
                 * the following dependencies from hflag should be removed.
-                * but for now I don't want to be bothered by this warnings
+                * But for now I don't want to be bothered by these warnings
                 * which are almost always useless.
                 */
                if (!hflag)
                        return;
                if (hflag && bsearch(hte->h_name, ignorelist,
-                   __arraycount(ignorelist), sizeof(ignorelist[0]),
+                   sizeof(ignorelist) / sizeof(ignorelist[0]),
+                   sizeof(ignorelist[0]),
                    (int (*)(const void *, const void *))strcmp) != NULL)
                        return;
 



Home | Main Index | Thread Index | Old Index