[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] arm64: fix build regression in of_path_of_nvme
From: |
Joakim Bech |
Subject: |
[PATCH] arm64: fix build regression in of_path_of_nvme |
Date: |
Mon, 26 Feb 2018 09:57:34 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
The of_path_of_nvme function 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 <address@hidden>
---
grub-core/osdep/linux/ofpath.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/grub-core/osdep/linux/ofpath.c b/grub-core/osdep/linux/ofpath.c
index 4308fceda..1c30e7233 100644
--- a/grub-core/osdep/linux/ofpath.c
+++ b/grub-core/osdep/linux/ofpath.c
@@ -362,7 +362,7 @@ of_path_of_nvme(const char *sys_devname
__attribute__((unused)),
digit_string = trailing_digits (device);
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. */
int part;
--
2.14.1
- [PATCH] arm64: fix build regression in of_path_of_nvme,
Joakim Bech <=