1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-13 21:49:54 +03:00

basic/utf8: reduce memory usage

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-05-22 10:20:52 +02:00
parent e3b4efd28f
commit 4c6d51390c

View File

@ -32,6 +32,7 @@
#include "gunicode.h"
#include "hexdecoct.h"
#include "macro.h"
#include "string-util.h"
#include "utf8.h"
bool unichar_is_valid(char32_t ch) {
@ -192,7 +193,7 @@ char *utf8_escape_invalid(const char *str) {
}
*s = '\0';
(void) str_realloc(&p);
return p;
}
@ -278,6 +279,7 @@ char *utf8_escape_non_printable_full(const char *str, size_t console_width) {
finish:
*s = '\0';
(void) str_realloc(&p);
return p;
}