mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
ieee1275: fix build regression in of_path_of_nvme
The of_path_of_nvme function (commit 2391d57, ieee1275: add nvme
support within ofpath) introduced a build regression:
grub-core/osdep/linux/ofpath.c:365:21: error: comparison between pointer
and zero character constant [-Werror=pointer-compare]
if ((digit_string != '\0') && (*part_end == 'p'))
Update digit_string to compare against the char instead of the pointer.
Signed-off-by: Joakim Bech <joakim.bech@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
a244d9ebc7
commit
72b425b640
1 file changed
+1
-1
@@ -362,7 +362,7 @@ of_path_of_nvme(const char *sys_devname __attribute__((unused)),
|
|||||||
digit_string = trailing_digits (device);
|
digit_string = trailing_digits (device);
|
||||||
part_end = devicenode + strlen (devicenode) - 1;
|
part_end = devicenode + strlen (devicenode) - 1;
|
||||||
|
|
||||||
if ((digit_string != '\0') && (*part_end == 'p'))
|
if ((*digit_string != '\0') && (*part_end == 'p'))
|
||||||
{
|
{
|
||||||
/* We have a partition number, strip it off. */
|
/* We have a partition number, strip it off. */
|
||||||
int part;
|
int part;
|
||||||
|
|||||||
Reference in new issue
Block a user