Commit 6f920c49 authored by npzacs's avatar npzacs
Browse files

Cosmetics

parent 9f7be2b2
......@@ -153,9 +153,9 @@ int hex_array_to_hexstring(char *str, const uint8_t *hex_array, uint32_t size)
return 1;
}
char * str_dup(const char *str)
char *str_dup(const char *str)
{
return str ? strcpy (malloc(strlen(str) + 1), str) : NULL;
return str ? strcpy (malloc(strlen(str) + 1), str) : NULL;
}
char *str_printf(const char *fmt, ...)
......@@ -167,8 +167,7 @@ char *str_printf(const char *fmt, ...)
char *tmp, *str;
str = malloc(size);
while (1)
{
while (1) {
/* Try to print in the allocated space. */
va_start(ap, fmt);
len = vsnprintf(str, size, fmt, ap);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment