mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* util/ieee1275/ofpath.c (my_isdigit): New function.
(trailing_digits): Use my_isdigit. (strip_trailing_digits): Likewise.
This commit is contained in:
1 parent
88d51eff35
commit
48afcb75fa
2 files changed
+14
-2
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2012-03-02 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
|
* util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
|
||||||
|
|||||||
@@ -185,6 +185,12 @@ block_device_get_sysfs_path_and_link(const char *devicenode)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
my_isdigit (int c)
|
||||||
|
{
|
||||||
|
return (c >= '0' && c <= '9');
|
||||||
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
trailing_digits (const char *p)
|
trailing_digits (const char *p)
|
||||||
{
|
{
|
||||||
@@ -193,7 +199,7 @@ trailing_digits (const char *p)
|
|||||||
end = p + strlen(p) - 1;
|
end = p + strlen(p) - 1;
|
||||||
while (end >= p)
|
while (end >= p)
|
||||||
{
|
{
|
||||||
if (! isdigit(*end))
|
if (! my_isdigit(*end))
|
||||||
break;
|
break;
|
||||||
end--;
|
end--;
|
||||||
}
|
}
|
||||||
@@ -410,7 +416,7 @@ strip_trailing_digits (const char *p)
|
|||||||
end = new + strlen(new) - 1;
|
end = new + strlen(new) - 1;
|
||||||
while (end >= new)
|
while (end >= new)
|
||||||
{
|
{
|
||||||
if (! isdigit(*end))
|
if (! my_isdigit(*end))
|
||||||
break;
|
break;
|
||||||
*end-- = '\0';
|
*end-- = '\0';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user