Commit 7b8a1650 authored by Geoff Simmons's avatar Geoff Simmons

simplify decode_l_va()

parent b127a5a3
......@@ -136,18 +136,14 @@ static inline size_t
decode_l_va(enum encoding dec, const char * const p, va_list ap)
{
size_t len = 0;
const char *next;
if (p == vrt_magic_string_end)
return 0;
if (p != NULL)
len = strlen(p);
AENC(dec);
while ((next = va_arg(ap, const char *)) != vrt_magic_string_end)
if (next != NULL)
len += strlen(next);
for (const char *s = p; s != vrt_magic_string_end;
s = va_arg(ap, const char *))
if (s != NULL && *s != '\0')
len += strlen(s);
AENC(dec);
return(func[dec].decode_l(len));
}
......
Markdown is supported
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