diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2014-07-26 13:58:24 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2014-07-26 13:58:24 +0200 |
commit | 3acf58eec890249179b6f992c59f9adcf05b8ca8 (patch) | |
tree | 330419ff2ccea3f5aea9d49bd0e5aba8b1d386b2 /src/font.c | |
parent | a072c708aaa91e61fa148b1a69884a40a5d8f9fb (diff) | |
download | emacs-3acf58eec890249179b6f992c59f9adcf05b8ca8.tar.gz |
Reorder conditions that are written backwards
* alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
(Fgarbage_collect): Reorder conditions that are written backwards.
* data.c (cons_to_unsigned): Likewise.
* dispnew.c (update_frame_1, sit_for): Likewise.
* fileio.c (file_offset): Likewise.
* filelock.c (read_lock_data, lock_file): Likewise.
* fns.c (larger_vector, make_hash_table, Fmake_hash_table):
Likewise.
* font.c (font_intern_prop, font_style_symbolic): Likewise.
* lisp.h (FIXNUM_OVERFLOW_P): Likewise.
* lread.c (read1): Likewise.
* minibuf.c (read_minibuf_noninteractive): Likewise.
* nsterm.m (x_set_frame_alpha): Likewise.
* process.c (wait_reading_process_output): Likewise.
* region-cache.c (delete_cache_boundaries): Likewise.
* xterm.c (x_set_frame_alpha): Likewise.
Diffstat (limited to 'src/font.c')
-rw-r--r-- | src/font.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/font.c b/src/font.c index 054a68bfd94..ee6d230e171 100644 --- a/src/font.c +++ b/src/font.c @@ -280,7 +280,7 @@ font_intern_prop (const char *str, ptrdiff_t len, bool force_symbol) if (len == 1 && *str == '*') return Qnil; - if (!force_symbol && 0 < len && '0' <= *str && *str <= '9') + if (!force_symbol && len > 0 && '0' <= *str && *str <= '9') { for (i = 1; i < len; i++) if (! ('0' <= str[i] && str[i] <= '9')) @@ -445,10 +445,10 @@ font_style_symbolic (Lisp_Object font, enum font_property_index prop, table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); CHECK_VECTOR (table); i = XINT (val) & 0xFF; - eassert (((i >> 4) & 0xF) < ASIZE (table)); + eassert (ASIZE (table) > ((i >> 4) & 0xF)); elt = AREF (table, ((i >> 4) & 0xF)); CHECK_VECTOR (elt); - eassert ((i & 0xF) + 1 < ASIZE (elt)); + eassert (ASIZE (elt) > (i & 0xF) + 1); elt = (for_face ? AREF (elt, 1) : AREF (elt, (i & 0xF) + 1)); CHECK_SYMBOL (elt); return elt; |