Source-Changes-HG archive

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

[src/trunk]: src/sys/sys sys/bitops.h: fix __BITMAP_ZERO for non-GCC compilers



details:   https://anonhg.NetBSD.org/src/rev/a44fafeabb3c
branches:  trunk
changeset: 985894:a44fafeabb3c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Sep 12 15:22:05 2021 +0000

description:
sys/bitops.h: fix __BITMAP_ZERO for non-GCC compilers

Running 'make -C sbin/cgdconfig lint' failed with:

cgdconfig.c(1253): error: left operand of '->' must be pointer to struct
    or union, not 'struct <unnamed>' [104]

diffstat:

 sys/sys/bitops.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r c208d3ce6445 -r a44fafeabb3c sys/sys/bitops.h
--- a/sys/sys/bitops.h  Sun Sep 12 10:28:40 2021 +0000
+++ b/sys/sys/bitops.h  Sun Sep 12 15:22:05 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bitops.h,v 1.14 2018/03/08 20:32:32 christos Exp $     */
+/*     $NetBSD: bitops.h,v 1.15 2021/09/12 15:22:05 rillig Exp $       */
 
 /*-
  * Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -321,7 +321,7 @@
 #else
 #define __BITMAP_ZERO(__v) do {                                                \
        size_t __i;                                                     \
-       for (__i = 0; __i < __arraycount(__v->_b); __i++)               \
+       for (__i = 0; __i < __arraycount((__v)->_b); __i++)             \
                (__v)->_b[__i] = 0;                                     \
        } while (/* CONSTCOND */ 0)
 #endif /* GCC 2.95 */



Home | Main Index | Thread Index | Old Index