From c278e2da0cf9aee161e23771125629bdfe8d5d89 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 20 Mar 2018 19:19:56 +0100 Subject: blogc: common: replace unsigned int with size_t --- src/common/utils.c | 4 ++-- src/common/utils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/utils.c b/src/common/utils.c index 97fa671..563d8ab 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -244,12 +244,12 @@ bc_str_strip(char *str) char** -bc_str_split(const char *str, char c, unsigned int max_pieces) +bc_str_split(const char *str, char c, size_t max_pieces) { if (str == NULL) return NULL; char **rv = bc_malloc(sizeof(char*)); - unsigned int i, start = 0, count = 0; + size_t i, start = 0, count = 0; for (i = 0; i < strlen(str) + 1; i++) { if (str[0] == '\0') break; diff --git a/src/common/utils.h b/src/common/utils.h index b0388b3..0f05c96 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -47,7 +47,7 @@ bool bc_str_ends_with(const char *str, const char *suffix); char* bc_str_lstrip(char *str); char* bc_str_rstrip(char *str); char* bc_str_strip(char *str); -char** bc_str_split(const char *str, char c, unsigned int max_pieces); +char** bc_str_split(const char *str, char c, size_t max_pieces); char* bc_str_replace(const char *str, const char search, const char *replace); char* bc_str_find(const char *str, char c); void bc_strv_free(char **strv); -- cgit v1.2.3-18-g5258