emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/raeburn-startup 702bcad 15/17: Don't memset storag


From: Ken Raeburn
Subject: [Emacs-diffs] scratch/raeburn-startup 702bcad 15/17: Don't memset storage we're about to fill anyway.
Date: Thu, 15 Dec 2016 11:33:19 +0000 (UTC)

branch: scratch/raeburn-startup
commit 702bcad88f12f9f59ce6358dd444a508ea0eebb7
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>

    Don't memset storage we're about to fill anyway.
    
    * src/charset.c (load_charset_map_from_file): Don't bother to memset
    the large allocated arrays before filling them.
---
 src/charset.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/src/charset.c b/src/charset.c
index e6226ce..0a710b0 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -500,7 +500,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;
   while (1)
@@ -531,7 +530,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;
        }
       idx = n_entries;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]