]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Simplify code.
authorBruno Haible <bruno@clisp.org>
Fri, 19 Dec 2025 20:50:39 +0000 (21:50 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 19 Dec 2025 20:50:39 +0000 (21:50 +0100)
* gettext-tools/src/its.c (_its_encode_special_chars,
_its_encode_special_chars_for_merge): Remove unnecessary memory store.

gettext-tools/src/its.c

index 1f6e60cda13ccab96374fbe02ca430b06b2b99bd..2708937c8bd61318f89a2925f7c47fedc3d68d08 100644 (file)
@@ -553,7 +553,6 @@ _its_encode_special_chars (const char *content, bool is_attribute)
     }
 
   char *result = XNMALLOC (amount + 1, char);
-  *result = '\0';
   {
     char *p = result;
     for (const char *str = content; *str != '\0'; str++)
@@ -2183,7 +2182,6 @@ _its_encode_special_chars_for_merge (const char *content)
     }
 
   char *result = XNMALLOC (amount + 1, char);
-  *result = '\0';
   {
     char *p = result;
     for (const char *str = content; *str != '\0'; str++)