diff --git a/cmdline/mingw.c b/cmdline/mingw.c index 22194d5a..a625d8a0 100644 --- a/cmdline/mingw.c +++ b/cmdline/mingw.c @@ -2071,7 +2071,7 @@ static int smartctl_scan(FILE* f, tommy_list* list) break; /* remove extraneous chars */ - s = polish(buf); + s = strpolish(buf); log_tag("smartctl:scan::text: %s\n", s); diff --git a/cmdline/state.c b/cmdline/state.c index 58ee503e..1090f8ac 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -682,7 +682,7 @@ void state_config(struct snapraid_state* state, const char* path, const char* co /* LCOV_EXCL_STOP */ } - split_mac = split(split_map, SPLIT_MAX+1, buffer, ","); + split_mac = strsplit(split_map, SPLIT_MAX+1, buffer, ","); if (split_mac > SPLIT_MAX) { /* LCOV_EXCL_START */ diff --git a/cmdline/support.c b/cmdline/support.c index 316dd981..69c95f4d 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -588,7 +588,7 @@ bail: /* LCOV_EXCL_STOP */ } -char* polish(char* s) +char* strpolish(char* s) { char* i = s; @@ -601,7 +601,7 @@ char* polish(char* s) return s; } -unsigned split(char** split_map, unsigned split_max, char* str, const char* delimiters) +unsigned strsplit(char** split_map, unsigned split_max, char* str, const char* delimiters) { unsigned mac = 0; @@ -1399,7 +1399,7 @@ int smartctl_attribute(FILE* f, const char* file, const char* name, uint64_t* sm break; /* remove extraneous chars */ - s = polish(buf); + s = strpolish(buf); log_tag("smartctl:%s:%s:out: %s\n", file, name, s); @@ -1478,7 +1478,7 @@ int smartctl_flush(FILE* f, const char* file, const char* name) break; /* remove extraneous chars */ - s = polish(buf); + s = strpolish(buf); log_tag("smartctl:%s:%s:out: %s\n", file, name, s); } diff --git a/cmdline/support.h b/cmdline/support.h index 891045d4..21249e31 100644 --- a/cmdline/support.h +++ b/cmdline/support.h @@ -241,14 +241,14 @@ static inline const char* esc_shell(const char* str, char* buffer) * * Note that the passed string is modified. */ -char* polish(char* s); +char* strpolish(char* s); /** * Split a string in multiple tokens separated by delimiters. * * Multiple delimiters are grouped together. */ -unsigned split(char** split_map, unsigned split_max, char* line, const char* delimiters); +unsigned strsplit(char** split_map, unsigned split_max, char* line, const char* delimiters); /****************************************************************************/ /* path */ diff --git a/cmdline/unix.c b/cmdline/unix.c index 84a1340d..5738f46b 100644 --- a/cmdline/unix.c +++ b/cmdline/unix.c @@ -130,8 +130,8 @@ static int devresolve_proc(uint64_t device, char* path, size_t path_size) separator += 3; /* split the line */ - first_mac = split(first_map, 8, s, " \t\r\n"); - second_mac = split(second_map, 8, separator, " \t\r\n"); + first_mac = strsplit(first_map, 8, s, " \t\r\n"); + second_mac = strsplit(second_map, 8, separator, " \t\r\n"); /* if too short, it's the wrong line */ if (first_mac < 5)