diff options
author | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-06 22:51:47 +0000 |
---|---|---|
committer | Jasper Lievisse Adriaanse <jasper@cvs.openbsd.org> | 2010-12-06 22:51:47 +0000 |
commit | 765af30a9a8bfca917e5df447c894a0853190178 (patch) | |
tree | 0b44002a62dbca933d5912dcd1339c2361000eaf /sys/arch/i386/stand/libsa | |
parent | 4e7753a7c93fd4040819da3289b11454d51ad050 (diff) |
- properly remove NENTS now after fixing the fallout.
ok deraadt@
Diffstat (limited to 'sys/arch/i386/stand/libsa')
-rw-r--r-- | sys/arch/i386/stand/libsa/debug.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/dev_i386.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/memprobe.c | 10 |
3 files changed, 11 insertions, 10 deletions
diff --git a/sys/arch/i386/stand/libsa/debug.c b/sys/arch/i386/stand/libsa/debug.c index 569fef851b5..e5164fbca69 100644 --- a/sys/arch/i386/stand/libsa/debug.c +++ b/sys/arch/i386/stand/libsa/debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: debug.c,v 1.15 2010/12/06 22:11:01 jasper Exp $ */ +/* $OpenBSD: debug.c,v 1.16 2010/12/06 22:51:46 jasper Exp $ */ /* * Copyright (c) 1997 Michael Shalayeff @@ -27,6 +27,7 @@ * */ +#include <sys/param.h> #include <lib/libsa/stand.h> #include <debug.h> #include <dev/cons.h> @@ -34,7 +35,7 @@ #define VBASE (0xb8000) char *const reg_names[] = { REG_NAMES }; -const int nreg = NENTS(reg_names); +const int nreg = nitems(reg_names); struct reg reg; u_int32_t *const reg_values[] = { REG_VALUES(reg) }; char *const trap_names[] = { TRAP_NAMES }; diff --git a/sys/arch/i386/stand/libsa/dev_i386.c b/sys/arch/i386/stand/libsa/dev_i386.c index f74c584eae7..099055faef1 100644 --- a/sys/arch/i386/stand/libsa/dev_i386.c +++ b/sys/arch/i386/stand/libsa/dev_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dev_i386.c,v 1.32 2010/12/06 22:11:01 jasper Exp $ */ +/* $OpenBSD: dev_i386.c,v 1.33 2010/12/06 22:51:46 jasper Exp $ */ /* * Copyright (c) 1996-1999 Michael Shalayeff @@ -38,13 +38,13 @@ const char bdevs[][4] = { "wd", "", "fd", "", "sd", "st", "cd", "mcd", "", "", "", "", "", "", "", "scd", "", "hd", "" }; -const int nbdevs = NENTS(bdevs); +const int nbdevs = nitems(bdevs); const char cdevs[][4] = { "cn", "", "", "", "", "", "", "", "com", "", "", "", "pc" }; -const int ncdevs = NENTS(cdevs); +const int ncdevs = nitems(cdevs); /* pass dev_t to the open routines */ int diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index db7472ac3d8..aece9b001fb 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.49 2010/12/06 22:11:01 jasper Exp $ */ +/* $OpenBSD: memprobe.c,v 1.50 2010/12/06 22:51:46 jasper Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -224,14 +224,14 @@ addrprobe(u_int kloc) { __volatile u_int *loc; register u_int i, ret = 0; - u_int save[NENTS(addrprobe_pat)]; + u_int save[nitems(addrprobe_pat)]; /* Get location */ loc = (int *)(kloc * 1024); save[0] = *loc; /* Probe address */ - for (i = 0; i < NENTS(addrprobe_pat); i++) { + for (i = 0; i < nitems(addrprobe_pat); i++) { *loc = addrprobe_pat[i]; if (*loc != addrprobe_pat[i]) ret++; @@ -240,13 +240,13 @@ addrprobe(u_int kloc) if (!ret) { /* Write address */ - for (i = 0; i < NENTS(addrprobe_pat); i++) { + for (i = 0; i < nitems(addrprobe_pat); i++) { save[i] = loc[i]; loc[i] = addrprobe_pat[i]; } /* Read address */ - for (i = 0; i < NENTS(addrprobe_pat); i++) { + for (i = 0; i < nitems(addrprobe_pat); i++) { if (loc[i] != addrprobe_pat[i]) ret++; loc[i] = save[i]; |