hexdecoct: use typesafe new() instead of malloc()

This commit is contained in:
Lennart Poettering
2017-02-02 00:10:44 +01:00
parent 49bfc8774b
commit 9ff233dc1f

View File

@@ -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;