mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
string_concat: Assume all variadic arguments point to const.
This commit is contained in:
parent
66614acbc0
commit
a4293ed606
@ -375,7 +375,7 @@ struct string *
|
|||||||
string_concat(struct string *string, ...)
|
string_concat(struct string *string, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
unsigned char *source;
|
const unsigned char *source;
|
||||||
|
|
||||||
assertm(string, "[string_concat]");
|
assertm(string, "[string_concat]");
|
||||||
if_assert_failed { return NULL; }
|
if_assert_failed { return NULL; }
|
||||||
@ -383,7 +383,7 @@ string_concat(struct string *string, ...)
|
|||||||
check_string_magic(string);
|
check_string_magic(string);
|
||||||
|
|
||||||
va_start(ap, string);
|
va_start(ap, string);
|
||||||
while ((source = va_arg(ap, unsigned char *)))
|
while ((source = va_arg(ap, const unsigned char *)))
|
||||||
if (*source)
|
if (*source)
|
||||||
add_to_string(string, source);
|
add_to_string(string, source);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user