mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 10:46:23 +00:00
Add alloca_strdup() macro
This commit is contained in:
parent
1a413b72db
commit
4de6c77d45
2
str.h
2
str.h
@ -68,6 +68,8 @@ size_t strn_fromhex(unsigned char *dstBinary, ssize_t dstlen, const char *src, c
|
||||
|
||||
#define alloca_tohex(buf,bytes) tohex((char *)alloca((bytes)*2+1), (bytes) * 2, (buf))
|
||||
|
||||
#define alloca_strdup(str) strcpy(alloca(strlen(str) + 1), (str))
|
||||
|
||||
__STR_INLINE int hexvalue(char c)
|
||||
{
|
||||
switch (c) {
|
||||
|
Loading…
Reference in New Issue
Block a user