mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
straconcat: Assume all arguments point to const.
This commit is contained in:
parent
03ccf0b2b1
commit
0ee76a0ef3
@ -132,10 +132,10 @@ insert_in_string(unsigned char **dst, int pos,
|
||||
}
|
||||
|
||||
unsigned char *
|
||||
straconcat(unsigned char *str, ...)
|
||||
straconcat(const unsigned char *str, ...)
|
||||
{
|
||||
va_list ap;
|
||||
unsigned char *a;
|
||||
const unsigned char *a;
|
||||
unsigned char *s;
|
||||
unsigned int len;
|
||||
|
||||
@ -149,7 +149,7 @@ straconcat(unsigned char *str, ...)
|
||||
if (len) memcpy(s, str, len);
|
||||
|
||||
va_start(ap, str);
|
||||
while ((a = va_arg(ap, unsigned char *))) {
|
||||
while ((a = va_arg(ap, const unsigned char *))) {
|
||||
unsigned int l = strlen(a);
|
||||
unsigned char *ns;
|
||||
|
||||
|
@ -58,7 +58,7 @@ unsigned char *insert_in_string(unsigned char **dst, int pos,
|
||||
* if (abc) return;
|
||||
* printf("%s", abc); -> print "ABC"
|
||||
* mem_free(abc); -> free memory used by @abc */
|
||||
unsigned char *straconcat(unsigned char *str, ...);
|
||||
unsigned char *straconcat(const unsigned char *str, ...);
|
||||
|
||||
|
||||
/* Misc. utility string functions. */
|
||||
|
Loading…
Reference in New Issue
Block a user