summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-04-05 12:30:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-04-05 12:30:36 -0700
commitfaa521749378dbfd97f49a0e5c48f6da2ce1ddba (patch)
treed470dbfa3328aaeffe5cba065103e237238a13be /src/lisp.h
parent1b058e42524353c9ff133ea330876ed2d39b6515 (diff)
downloademacs-faa521749378dbfd97f49a0e5c48f6da2ce1ddba.tar.gz
Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
* alloc.c (memory_full): * charset.c (syms_of_charset): * doc.c (Fsnarf_documentation): * emacs.c (main): * font.c (BUILD_STYLE_TABLE): * keyboard.c (make_lispy_event): * profiler.c (setup_cpu_timer): * xgselect.c (xg_select): * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG): Use ARRAYELTS. * font.c (FONT_PROPERTY_TABLE_SIZE): Remove. Replace the only use with ARRAYELTS (font_property_table). * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lisp.h b/src/lisp.h
index a697e39a204..03c0d99fb27 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -58,8 +58,8 @@ INLINE_HEADER_BEGIN
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
-/* Find number of elements in array */
-#define ARRAYELTS(arr) (sizeof (arr) / sizeof ((arr)[0]))
+/* Number of elements in an array. */
+#define ARRAYELTS(arr) (sizeof (arr) / sizeof (arr)[0])
/* EMACS_INT - signed integer wide enough to hold an Emacs value
EMACS_INT_MAX - maximum value of EMACS_INT; can be used in #if