summaryrefslogtreecommitdiff
path: root/src/dircolors.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-05-17 13:02:25 +0200
committerJim Meyering <meyering@redhat.com>2009-05-17 13:59:12 +0200
commit9593a3d8e78ece58deab5a30632021322bbc16d0 (patch)
treea2f3e289371a2d3e78eb2ca3a35c99c0b54c8d4c /src/dircolors.c
parent65ed4ca07bd18c2038b5863ed1e18d3bfc8e696d (diff)
downloadcoreutils-9593a3d8e78ece58deab5a30632021322bbc16d0.tar.xz
maint: use ARRAY_CARDINALITY more
* src/sort.c (main): Use ARRAY_CARDINALITY, rather than open-coding it. * src/factor.c (WHEEL_END): Likewise. * src/csplit.c (main): Likewise. * src/od.c: Likewise, * src/ls.c (main): Likewise. (N_ENTRIES): Remove definition. Use ARRAY_CARDINALITY instead. * src/dircolors.c: Likewise. (array_len): Remove definition.
Diffstat (limited to 'src/dircolors.c')
-rw-r--r--src/dircolors.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/dircolors.c b/src/dircolors.c
index 7dad7fd9b..f01d5575f 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -1,5 +1,5 @@
/* dircolors - output commands to set the LS_COLOR environment variable
- Copyright (C) 1996-2008 Free Software Foundation, Inc.
+ Copyright (C) 1996-2009 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin
This program is free software: you can redistribute it and/or modify
@@ -73,8 +73,7 @@ static const char *const ls_codes[] =
"so", "bd", "bd", "cd", "cd", "do", "ex", "lc", "lc", "rc", "rc", "ec", "ec",
"su", "su", "sg", "sg", "st", "ow", "ow", "tw", "tw", "ca", "hl", "cl", NULL
};
-#define array_len(Array) (sizeof (Array) / sizeof *(Array))
-verify (array_len (slack_codes) == array_len (ls_codes));
+verify (ARRAY_CARDINALITY (slack_codes) == ARRAY_CARDINALITY (ls_codes));
static struct option const long_options[] =
{