From: Peter Krempa <pkrempa(a)redhat.com>
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/storage/parthelper.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/storage/parthelper.c b/src/storage/parthelper.c
index 1169ebfb64..94aac34f7c 100644
--- a/src/storage/parthelper.c
+++ b/src/storage/parthelper.c
@@ -95,8 +95,11 @@ int main(int argc, char **argv)
if (virFileResolveLink(path, &canonical_path) != 0)
return 2;
- partsep = *canonical_path &&
- g_ascii_isdigit(canonical_path[strlen(canonical_path)-1]) ? "p" :
"";
+ if (*canonical_path &&
+ g_ascii_isdigit(canonical_path[strlen(canonical_path)-1]))
+ partsep = "p";
+ else
+ partsep = "";
}
if ((dev = ped_device_get(path)) == NULL) {
--
2.49.0