commit 1a7da42e0adac827e83507d10d4f1bfc72f5c6b8
parent defc040b7e1d827d193f3921e199ea20124549af
Author: nolash <dev@holbrook.no>
Date: Sun, 2 Feb 2020 01:32:53 +0100
remove malloc
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hex.c b/hex.c
@@ -56,9 +56,7 @@ size_t hex2bin(const char *hex, unsigned char *out) {
return 0;
len /= 2;
- //*out = malloc(len);
- //memset(*out, 'A', len);
- memset(out, 'A', len);
+ //memset(out, 'A', len);
for (i=0; i<len; i++) {
if (!hexchr2bin(hex[i*2], &b1) || !hexchr2bin(hex[i*2+1], &b2)) {
return 0;