rename uc_strvec_expand->uc_strvec_check_expand, and clarify

docs
This commit is contained in:
Nils O. Selåsdal
2013-12-18 00:03:11 +01:00
parent 607cc8cd9b
commit f9f4f3192a
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -38,12 +38,12 @@ void uc_strv_init(struct UCStrv *strv);
int uc_strv_grow(struct UCStrv *strv, size_t cnt); int uc_strv_grow(struct UCStrv *strv, size_t cnt);
/** /**
* Expand the UCStrv to hold 1 more item * Expand the UCStrv to hold attleast 1 more item if needed
* *
* @param strv UCStrv to expand * @param strv UCStrv to expand
* @return 0 on success, otherwise failure * @return 0 on success, otherwise failure
**/ **/
int uc_strv_expand(struct UCStrv *strv); int uc_strv_check_expand(struct UCStrv *strv);
/** /**
* Append a string to the UCStrv, the string will be copied in * Append a string to the UCStrv, the string will be copied in
+4 -4
View File
@@ -24,7 +24,7 @@ int uc_strv_grow(struct UCStrv *strv, size_t cnt)
return 0; return 0;
} }
int uc_strv_expand(struct UCStrv *strv) int uc_strv_check_expand(struct UCStrv *strv)
{ {
int rc = 0; int rc = 0;
@@ -41,7 +41,7 @@ int uc_strv_append(struct UCStrv *strv, const char *str)
int rc; int rc;
char *dup; char *dup;
rc = uc_strv_expand(strv); rc = uc_strv_check_expand(strv);
if (rc != 0) { if (rc != 0) {
return rc; return rc;
} }
@@ -60,7 +60,7 @@ int uc_strv_append(struct UCStrv *strv, const char *str)
int uc_strv_append_nocopy(struct UCStrv *strv, char *str) int uc_strv_append_nocopy(struct UCStrv *strv, char *str)
{ {
int rc; int rc;
rc = uc_strv_expand(strv); rc = uc_strv_check_expand(strv);
if (rc != 0) { if (rc != 0) {
return rc; return rc;
@@ -76,7 +76,7 @@ int uc_strv_null_terminate(struct UCStrv *strv)
{ {
int rc; int rc;
rc = uc_strv_expand(strv); rc = uc_strv_check_expand(strv);
if (rc != 0) { if (rc != 0) {
return rc; return rc;
} }