diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-02 00:10:44 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-02 00:10:44 +0100 |
commit | 9ff233dc1fa2f47fc4499a12a8ee0640aba30657 (patch) | |
tree | 6118980c496c0ce37bb2109e07b965bbaecce03a /src/basic/hexdecoct.c | |
parent | 49bfc8774bf900fb2239a9b70b951aedccbfed5a (diff) | |
download | systemd-9ff233dc1fa2f47fc4499a12a8ee0640aba30657.tar.gz |
hexdecoct: use typesafe new() instead of malloc()
Diffstat (limited to 'src/basic/hexdecoct.c')
-rw-r--r-- | src/basic/hexdecoct.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c index 6843aedd0a..2d6e377f0a 100644 --- a/src/basic/hexdecoct.c +++ b/src/basic/hexdecoct.c @@ -72,10 +72,10 @@ int unhexchar(char c) { } char *hexmem(const void *p, size_t l) { - char *r, *z; const uint8_t *x; + char *r, *z; - z = r = malloc(l * 2 + 1); + z = r = new(char, l * 2 + 1); if (!r) return NULL; |