(trailing_digits): Use my_isdigit.
(strip_trailing_digits): Likewise.
+2012-03-02 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * util/ieee1275/ofpath.c (my_isdigit): New function.
+ (trailing_digits): Use my_isdigit.
+ (strip_trailing_digits): Likewise.
+
2012-03-02 Vladimir Serbinenko <phcoder@gmail.com>
* util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
return ret;
}
+static inline int
+my_isdigit (int c)
+{
+ return (c >= '0' && c <= '9');
+}
+
static const char *
trailing_digits (const char *p)
{
end = p + strlen(p) - 1;
while (end >= p)
{
- if (! isdigit(*end))
+ if (! my_isdigit(*end))
break;
end--;
}
end = new + strlen(new) - 1;
while (end >= new)
{
- if (! isdigit(*end))
+ if (! my_isdigit(*end))
break;
*end-- = '\0';
}