1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 13:54:12 +01:00

WUtil: Added 'const' attribute on non-modified arguments to functions

A number of functions do not actually modify the strings given as
parameter, but only read or duplicate it. In this case it is a good
practice to mark that parameter as pointer-to-const to let the
compiler known about it, to be able to perform appropriate
optimisations.
This commit is contained in:
Christophe CURIS
2013-05-04 15:43:21 +02:00
committed by Carlos R. Mafra
parent ac89706859
commit bbf84eb0e8
4 changed files with 15 additions and 15 deletions

View File

@@ -203,7 +203,7 @@ char *wstrndup(const char *str, size_t len)
return copy;
}
char *wstrconcat(char *str1, char *str2)
char *wstrconcat(const char *str1, const char *str2)
{
char *str;
size_t slen;
@@ -226,7 +226,7 @@ char *wstrconcat(char *str1, char *str2)
return str;
}
char *wstrappend(char *dst, char *src)
char *wstrappend(char *dst, const char *src)
{
size_t slen;