summaryrefslogtreecommitdiff
path: root/src/basic/hexdecoct.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-02 00:10:44 +0100
committerSven Eden <yamakuzure@gmx.net>2017-07-17 17:58:36 +0200
commit5aed4ca1fbd96ed4dcc785753ca46e0b1d8def3b (patch)
tree9d0a26151cf1e7c2191bfb8e28d0a23365299770 /src/basic/hexdecoct.c
parent321384507f1223033fc0fb2969f6e29598ba7d92 (diff)
hexdecoct: use typesafe new() instead of malloc()
Diffstat (limited to 'src/basic/hexdecoct.c')
-rw-r--r--src/basic/hexdecoct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/hexdecoct.c b/src/basic/hexdecoct.c
index 6843aedd0..2d6e377f0 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;