Use restrict on pointers where it makes sense. (requires C99 support,

which we already assume)
This commit is contained in:
Nils O. Selåsdal
2014-05-25 23:07:08 +02:00
parent a24aa93b73
commit 5bd23d751f
12 changed files with 37 additions and 37 deletions
+3 -3
View File
@@ -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;