summaryrefslogtreecommitdiff
path: root/src/dosfns.c
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2014-04-03 00:14:02 -0700
committerDaniel Colascione <dancol@dancol.org>2014-04-03 00:14:02 -0700
commit705cf384bec23354ad22a5c48d3430a96ef70ca1 (patch)
tree1615876bc7abad32f5e41ea34c5cd1747466798a /src/dosfns.c
parent3a9e7a49deea49088a773c321e52185e922748d6 (diff)
downloademacs-705cf384bec23354ad22a5c48d3430a96ef70ca1.tar.gz
Clean up array size calculations
Diffstat (limited to 'src/dosfns.c')
-rw-r--r--src/dosfns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dosfns.c b/src/dosfns.c
index 071d73ea16e..b98e3cd8f29 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -402,7 +402,7 @@ msdos_stdcolor_idx (const char *name)
{
int i;
- for (i = 0; i < sizeof (vga_colors) / sizeof (vga_colors[0]); i++)
+ for (i = 0; i < EARRAYSIZE (vga_colors); i++)
if (xstrcasecmp (name, vga_colors[i]) == 0)
return i;
@@ -422,7 +422,7 @@ msdos_stdcolor_name (int idx)
return build_string (unspecified_fg);
else if (idx == FACE_TTY_DEFAULT_BG_COLOR)
return build_string (unspecified_bg);
- else if (idx >= 0 && idx < sizeof (vga_colors) / sizeof (vga_colors[0]))
+ else if (idx >= 0 && idx < EARRAYSIZE (vga_colors))
return build_string (vga_colors[idx]);
else
return Qunspecified; /* meaning the default */