Mon, 14 May 2018 18:16:12 +0200
renames ucx_sstrcmp() to ucx_cmp_sstr()
docs/src/modules.md | file | annotate | diff | comparison | revisions | |
src/ucx/utils.h | file | annotate | diff | comparison | revisions | |
src/utils.c | file | annotate | diff | comparison | revisions |
1.1 --- a/docs/src/modules.md Mon May 14 18:13:03 2018 +0200 1.2 +++ b/docs/src/modules.md Mon May 14 18:16:12 2018 +0200 1.3 @@ -204,7 +204,7 @@ 1.4 UcxList* remove_duplicates(sstr_t* array, size_t arrlen) { 1.5 UcxList* list = NULL; 1.6 for (size_t i = 0 ; i < arrlen ; ++i) { 1.7 - if (ucx_list_find(list, array+i, ucx_sstrcmp, NULL) == -1) { 1.8 + if (ucx_list_find(list, array+i, ucx_cmp_sstr, NULL) == -1) { 1.9 sstr_t* s = malloc(sizeof(sstr_t)); 1.10 *s = sstrdup(array[i]); 1.11 list = ucx_list_append(list, s);
2.1 --- a/src/ucx/utils.h Mon May 14 18:13:03 2018 +0200 2.2 +++ b/src/ucx/utils.h Mon May 14 18:16:12 2018 +0200 2.3 @@ -162,7 +162,7 @@ 2.4 * @param data ignored 2.5 * @return the result of sstrcmp(s1, s2) 2.6 */ 2.7 -int ucx_sstrcmp(const void *s1, const void *s2, void *data); 2.8 +int ucx_cmp_sstr(const void *s1, const void *s2, void *data); 2.9 2.10 /** 2.11 * Compares two integers of type int.
3.1 --- a/src/utils.c Mon May 14 18:13:03 2018 +0200 3.2 +++ b/src/utils.c Mon May 14 18:16:12 2018 +0200 3.3 @@ -96,7 +96,7 @@ 3.4 return strncmp((const char*)s1, (const char*)s2, *((size_t*) n)); 3.5 } 3.6 3.7 -int ucx_sstrcmp(const void *s1, const void *s2, void *data) { 3.8 +int ucx_cmp_sstr(const void *s1, const void *s2, void *data) { 3.9 sstr_t a = *(const sstr_t*) s1; 3.10 sstr_t b = *(const sstr_t*) s2; 3.11 return sstrcmp(a, b);