summaryrefslogtreecommitdiffstats
path: root/examples/to-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/to-xml.c')
-rw-r--r--examples/to-xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/to-xml.c b/examples/to-xml.c
index 6d0a1dfb..f48d1ca7 100644
--- a/examples/to-xml.c
+++ b/examples/to-xml.c
@@ -149,7 +149,7 @@ display_partitions (guestfs_h *g, const char *dev)
* That's a limitation of sorts of the Linux kernel. (Actually,
* we could do this if we add the kpartx program to libguestfs).
*/
- if (strncmp (dev, "/dev/sd", 7) != 0 || isdigit (dev[strlen(dev)-1])) {
+ if (STRNEQLEN (dev, "/dev/sd", 7) || isdigit (dev[strlen(dev)-1])) {
printf ("<vm-image dev=\"%s\"/>\n", dev);
return;
}