# HG changeset patch # User Sascha Wilde # Date 1395420369 -3600 # Node ID 080660b2ce7d0d9da3ba2a59f21d3502127cfe98 # Parent c602d8cfa6195e8e25c1ab47401967ca23a2f4d4# Parent 5ed770c41a73b58560f0329cf66ea5c7b73e9ea6 Merged diff -r 5ed770c41a73 -r 080660b2ce7d cinst/main.c --- a/cinst/main.c Fri Mar 21 16:33:18 2014 +0000 +++ b/cinst/main.c Fri Mar 21 17:46:09 2014 +0100 @@ -92,17 +92,17 @@ } if (*buf == 'I') { /* Remove leading I: and trailing \r\n */ - array_append_str(to_install, buf+2, len - 4); + strv_append(to_install, buf+2, len - 4); continue; } if (*buf == 'R') { /* Remove leading R: and trailing \r\n */ - array_append_str(to_remove, buf+2, len - 4); + strv_append(to_remove, buf+2, len - 4); continue; } if (strcmp("UNINSTALL", buf) == 0) { /* Remove trailing \r\n */ - array_append_str(to_remove, buf, len - 2); + strv_append(to_remove, buf, len - 2); } } @@ -255,8 +255,8 @@ #endif /* Make valgrind happy */ - strfreev(to_install); - strfreev(to_remove); + strv_free(to_install); + strv_free(to_remove); free(certificate_list); return 0; diff -r 5ed770c41a73 -r 080660b2ce7d common/strhelp.c --- a/common/strhelp.c Fri Mar 21 16:33:18 2014 +0000 +++ b/common/strhelp.c Fri Mar 21 17:46:09 2014 +0100 @@ -51,7 +51,7 @@ return i; } -void array_append_str(char ***pArray, const char *string, const size_t len) +void strv_append (char ***pArray, const char *string, const size_t len) { unsigned int old_len = 0; @@ -90,7 +90,7 @@ } void -strfreev (char **str_array) +strv_free (char **str_array) { if (str_array) { diff -r 5ed770c41a73 -r 080660b2ce7d common/strhelp.h --- a/common/strhelp.h Fri Mar 21 16:33:18 2014 +0000 +++ b/common/strhelp.h Fri Mar 21 17:46:09 2014 +0100 @@ -29,7 +29,7 @@ * @param[in] string pointer to the string to append to the list. * @param[in] len length of the string to append to the list * */ -void array_append_str(char ***pArray, const char *string, const size_t len); +void strv_append (char ***pArray, const char *string, const size_t len); /* @brief append a string to another string. * @@ -38,8 +38,8 @@ * @param[in] appendage pointer to the string to append. * @param[in] len length of the string to append. * */ -void str_append_str(char **pDst, size_t *dst_len, const char *appendage, +void str_append_str (char **pDst, size_t *dst_len, const char *appendage, const size_t len); -void strfreev (char **str_array); +void strv_free (char **str_array); #endif