diff options
| author | Paul Eggert | 2014-04-05 12:30:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-04-05 12:30:36 -0700 |
| commit | faa521749378dbfd97f49a0e5c48f6da2ce1ddba (patch) | |
| tree | d470dbfa3328aaeffe5cba065103e237238a13be /src/xterm.c | |
| parent | 1b058e42524353c9ff133ea330876ed2d39b6515 (diff) | |
| download | emacs-faa521749378dbfd97f49a0e5c48f6da2ce1ddba.tar.gz emacs-faa521749378dbfd97f49a0e5c48f6da2ce1ddba.zip | |
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/xterm.c')
| -rw-r--r-- | src/xterm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index a04f2fef055..dd71a8a1986 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -308,7 +308,7 @@ int event_record_index; | |||
| 308 | void | 308 | void |
| 309 | record_event (char *locus, int type) | 309 | record_event (char *locus, int type) |
| 310 | { | 310 | { |
| 311 | if (event_record_index == sizeof (event_record) / sizeof (struct record)) | 311 | if (event_record_index == ARRAYELTS (event_record)) |
| 312 | event_record_index = 0; | 312 | event_record_index = 0; |
| 313 | 313 | ||
| 314 | event_record[event_record_index].locus = locus; | 314 | event_record[event_record_index].locus = locus; |
| @@ -5624,7 +5624,7 @@ static int temp_index; | |||
| 5624 | static short temp_buffer[100]; | 5624 | static short temp_buffer[100]; |
| 5625 | 5625 | ||
| 5626 | #define STORE_KEYSYM_FOR_DEBUG(keysym) \ | 5626 | #define STORE_KEYSYM_FOR_DEBUG(keysym) \ |
| 5627 | if (temp_index == sizeof temp_buffer / sizeof (short)) \ | 5627 | if (temp_index == ARRAYELTS (temp_buffer)) \ |
| 5628 | temp_index = 0; \ | 5628 | temp_index = 0; \ |
| 5629 | temp_buffer[temp_index++] = (keysym) | 5629 | temp_buffer[temp_index++] = (keysym) |
| 5630 | 5630 | ||