isnumber() is already defined for some libcs [0] but the interface is not the
same, the isnumber() helper just checks if a single character is a digit.
Rename isnumber() to is_number() in order to avoid the clash.
[0] https://man.freebsd.org/cgi/man.cgi?query=isnumber&sektion=3
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
create-diff-object.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/create-diff-object.c b/create-diff-object.c
index 67784642bcd7..d0e14e3a62bb 100644
--- a/create-diff-object.c
+++ b/create-diff-object.c
@@ -1352,7 +1352,7 @@ static void kpatch_process_special_sections(struct kpatch_elf *kelf)
}
/* Returns true if s is a string of only numbers with length > 0. */
-static bool isnumber(const char *s)
+static bool is_number(const char *s)
{
do {
if (!*s || !isdigit(*s))
@@ -1380,13 +1380,13 @@ static bool is_rodata_str_section(const char *name)
/* Check if name matches ".rodata.str1.[0-9]+" */
if (!strncmp(name, GCC_5_SECTION_NAME, strlen(GCC_5_SECTION_NAME)))
- return isnumber(name + strlen(GCC_5_SECTION_NAME));
+ return is_number(name + strlen(GCC_5_SECTION_NAME));
/* Check if name matches ".rodata.<func>.str1.[0-9]+" */
s = strstr(name, GCC_6_SECTION_NAME);
if (!s)
return false;
- return isnumber(s + strlen(GCC_6_SECTION_NAME));
+ return is_number(s + strlen(GCC_6_SECTION_NAME));
#undef GCC_5_SECTION_NAME
#undef GCC_6_SECTION_NAME
}
--
2.42.0