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/coding.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/coding.c')
| -rw-r--r-- | src/coding.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/coding.c b/src/coding.c index b11143a32fb..77cea77cef5 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -11272,13 +11272,10 @@ internal character representation. */); | |||
| 11272 | Vtranslation_table_for_input = Qnil; | 11272 | Vtranslation_table_for_input = Qnil; |
| 11273 | 11273 | ||
| 11274 | { | 11274 | { |
| 11275 | Lisp_Object args[coding_arg_undecided_max]; | 11275 | verify (NIL_IS_ZERO); |
| 11276 | Lisp_Object plist[16]; | 11276 | Lisp_Object args[coding_arg_undecided_max] = { LISP_INITIALLY_ZERO, }; |
| 11277 | int i; | ||
| 11278 | |||
| 11279 | for (i = 0; i < coding_arg_undecided_max; i++) | ||
| 11280 | args[i] = Qnil; | ||
| 11281 | 11277 | ||
| 11278 | Lisp_Object plist[16]; | ||
| 11282 | plist[0] = intern_c_string (":name"); | 11279 | plist[0] = intern_c_string (":name"); |
| 11283 | plist[1] = args[coding_arg_name] = Qno_conversion; | 11280 | plist[1] = args[coding_arg_name] = Qno_conversion; |
| 11284 | plist[2] = intern_c_string (":mnemonic"); | 11281 | plist[2] = intern_c_string (":mnemonic"); |