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 don't use __arraycount in tools



details:   https://anonhg.NetBSD.org/src/rev/1b50cca4f61a
branches:  trunk
changeset: 761751:1b50cca4f61a
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Feb 06 23:03:02 2011 +0000

description:
don't use __arraycount in tools

diffstat:

 usr.bin/xlint/lint1/mkops |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 7d1df6457937 -r 1b50cca4f61a usr.bin/xlint/lint1/mkops
--- a/usr.bin/xlint/lint1/mkops Sun Feb 06 21:38:09 2011 +0000
+++ b/usr.bin/xlint/lint1/mkops Sun Feb 06 23:03:02 2011 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#      $NetBSD: mkops,v 1.5 2011/02/06 18:28:22 christos Exp $
+#      $NetBSD: mkops,v 1.6 2011/02/06 23:03:02 pooka Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -119,7 +119,7 @@
                printf("{\n");
                printf("\tsize_t i;\n");
                printf("\n");
-               printf("\tfor (i = 0; i < __arraycount(imods); i++)\n");
+               printf("\tfor (i=0; i<sizeof(imods)/sizeof(imods[0]); i++)\n");
                printf("\t\tif (imods[i].ok)\n");
                printf("\t\t\tSTRUCT_ASSIGN(modtab[i], imods[i].m);\n");
                printf("}\n");



Home | Main Index | Thread Index | Old Index