mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 08:56:15 +09:00
hexdecoct: use typesafe new() instead of malloc()
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user