From dbbe9e7d2456bb9a1f336658bb9bb02babf7b30f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 13 May 2025 11:24:48 +0200 Subject: [PATCH] treewide: add ul_ to parse_range() function name Signed-off-by: Karel Zak --- disk-utils/partx.c | 2 +- include/strutils.h | 2 +- lib/strutils.c | 2 +- text-utils/column.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/disk-utils/partx.c b/disk-utils/partx.c index 49d506158..4c8b1f09b 100644 --- a/disk-utils/partx.c +++ b/disk-utils/partx.c @@ -864,7 +864,7 @@ int main(int argc, char **argv) what = ACT_LIST; break; case 'n': - if (parse_range(optarg, &lower, &upper, 0)) + if (ul_parse_range(optarg, &lower, &upper, 0)) errx(EXIT_FAILURE, _("failed to parse --nr range")); break; case 'o': diff --git a/include/strutils.h b/include/strutils.h index f8eb5f7c4..58cca41c9 100644 --- a/include/strutils.h +++ b/include/strutils.h @@ -260,7 +260,7 @@ extern int string_to_bitarray(const char *list, char *ary, extern int string_to_bitmask(const char *list, unsigned long *mask, long (*name2flag)(const char *, size_t)); -extern int parse_range(const char *str, int *lower, int *upper, int def); +extern int ul_parse_range(const char *str, int *lower, int *upper, int def); extern int streq_paths(const char *a, const char *b); diff --git a/lib/strutils.c b/lib/strutils.c index 4d727585a..cfa4d262d 100644 --- a/lib/strutils.c +++ b/lib/strutils.c @@ -863,7 +863,7 @@ int string_to_bitmask(const char *list, * * Returns: 0 on success, <0 on error. */ -int parse_range(const char *str, int *lower, int *upper, int def) +int ul_parse_range(const char *str, int *lower, int *upper, int def) { char *end = NULL; diff --git a/text-utils/column.c b/text-utils/column.c index d67251648..a929cd813 100644 --- a/text-utils/column.c +++ b/text-utils/column.c @@ -482,7 +482,7 @@ static void apply_columnflag_from_list(struct column_control *ctl, const char *l } /* parse range (N-M) */ - if (strchr(*one, '-') && parse_range(*one, &low, &up, 0) == 0) { + if (strchr(*one, '-') && ul_parse_range(*one, &low, &up, 0) == 0) { for (; low <= up; low++) { if (low < 0) cl = get_last_visible_column(ctl, (low * -1) -1); -- 2.39.5