]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't memset storage we're about to fill anyway.
authorKen Raeburn <raeburn@raeburn.org>
Tue, 13 Dec 2016 05:37:20 +0000 (00:37 -0500)
committerKen Raeburn <raeburn@raeburn.org>
Sat, 22 Jul 2017 08:36:20 +0000 (04:36 -0400)
* src/charset.c (load_charset_map_from_file): Don't bother to memset
the large allocated arrays before filling them.

src/charset.c

index 6ce2f902c8169282f99605557a42489b52e0d131..15a50b29d0b7eb6797d217d6d5e46a0f6365c871 100644 (file)
@@ -501,7 +501,6 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile,
      large (larger than MAX_ALLOCA).  */
   head = record_xmalloc (sizeof *head);
   entries = head;
-  memset (entries, 0, sizeof (struct charset_map_entries));
 
   n_entries = 0;
   int ch = -1;
@@ -535,7 +534,6 @@ load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile,
        {
          entries->next = record_xmalloc (sizeof *entries->next);
          entries = entries->next;
-         memset (entries, 0, sizeof (struct charset_map_entries));
          n_entries = 0;
        }
       int idx = n_entries;