Use restrict on pointers where it makes sense. (requires C99 support,
which we already assume)
This commit is contained in:
+3
-3
@@ -36,7 +36,7 @@ int uc_strv_check_expand(struct UCStrv *strv)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int uc_strv_append(struct UCStrv *strv, const char *str)
|
||||
int uc_strv_append(struct UCStrv *strv, const char *restrict str)
|
||||
{
|
||||
int rc;
|
||||
char *dup;
|
||||
@@ -57,7 +57,7 @@ int uc_strv_append(struct UCStrv *strv, const char *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int uc_strv_append_nocopy(struct UCStrv *strv, char *str)
|
||||
int uc_strv_append_nocopy(struct UCStrv *strv, char *restrict str)
|
||||
{
|
||||
int rc;
|
||||
rc = uc_strv_check_expand(strv);
|
||||
@@ -105,7 +105,7 @@ void uc_strv_destroy(struct UCStrv *strv)
|
||||
strv->strings = NULL;
|
||||
}
|
||||
|
||||
int uc_strv_append_all(struct UCStrv *a, struct UCStrv *b, int copy)
|
||||
int uc_strv_append_all(struct UCStrv *restrict a, struct UCStrv *restrict b, int copy)
|
||||
{
|
||||
size_t i;
|
||||
int rc;
|
||||
|
||||
Reference in New Issue
Block a user