diff options
| author | Paul Eggert | 2015-01-19 00:56:18 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-19 01:01:58 -0800 |
| commit | b7f83adda5a32140811e8e7decc4394d64cada3d (patch) | |
| tree | 98d7d6763a62fc033464e4f2d5edde5c937623dd /src/fringe.c | |
| parent | 9592a014df784e67a4647d5b6424f2758dfaad3c (diff) | |
| download | emacs-b7f83adda5a32140811e8e7decc4394d64cada3d.tar.gz emacs-b7f83adda5a32140811e8e7decc4394d64cada3d.zip | |
Prefer memset to repeatedly assigning Qnil
* alloc.c (allocate_pseudovector): Catch more bogus values.
* alloc.c (allocate_pseudovector):
* callint.c (Fcall_interactively):
* coding.c (syms_of_coding):
* fringe.c (init_fringe):
Verify that Qnil == 0.
* callint.c (Fcall_interactively):
* eval.c (Fapply, Ffuncall):
* fns.c (mapcar1, larger_vector):
* font.c (font_expand_wildcards):
* fringe.c (init_fringe):
Prefer memset to assigning zeros by hand.
* callint.c (Fcall_interactively):
Remove duplicate assignment of Qnil to args[i].
* coding.c (syms_of_coding):
Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
* fileio.c (Ffile_selinux_context):
Rewrite to avoid need for Lisp_Object array.
* lisp.h (XLI_BUILTIN_LISPSYM): New macro.
(DEFINE_LISP_SYMBOL_END): Use it.
(NIL_IS_ZERO): New constant.
(memsetnil): New function.
Diffstat (limited to 'src/fringe.c')
| -rw-r--r-- | src/fringe.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/fringe.c b/src/fringe.c index c7262d19336..464379d0cd0 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -1723,15 +1723,12 @@ init_fringe_once (void) | |||
| 1723 | void | 1723 | void |
| 1724 | init_fringe (void) | 1724 | init_fringe (void) |
| 1725 | { | 1725 | { |
| 1726 | int i; | ||
| 1727 | |||
| 1728 | max_fringe_bitmaps = MAX_STANDARD_FRINGE_BITMAPS + 20; | 1726 | max_fringe_bitmaps = MAX_STANDARD_FRINGE_BITMAPS + 20; |
| 1729 | 1727 | ||
| 1730 | fringe_bitmaps = xzalloc (max_fringe_bitmaps * sizeof *fringe_bitmaps); | 1728 | fringe_bitmaps = xzalloc (max_fringe_bitmaps * sizeof *fringe_bitmaps); |
| 1731 | fringe_faces = xmalloc (max_fringe_bitmaps * sizeof *fringe_faces); | ||
| 1732 | 1729 | ||
| 1733 | for (i = 0; i < max_fringe_bitmaps; i++) | 1730 | verify (NIL_IS_ZERO); |
| 1734 | fringe_faces[i] = Qnil; | 1731 | fringe_faces = xzalloc (max_fringe_bitmaps * sizeof *fringe_faces); |
| 1735 | } | 1732 | } |
| 1736 | 1733 | ||
| 1737 | #ifdef HAVE_NTGUI | 1734 | #ifdef HAVE_NTGUI |