search for: 4317619

Displaying 1 result from an estimated 1 matches for "4317619".

Did you mean: 417619
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...int fd, r, is_dev; char buf[GUESTFS_MAX_CHUNK_SIZE]; - is_dev = strncmp (filename, "/dev/", 5) == 0; + is_dev = STREQLEN (filename, "/dev/", 5); if (!is_dev) CHROOT_IN; fd = open (filename, O_RDONLY); diff --git a/examples/to-xml.c b/examples/to-xml.c index f48d1ca..4317619 100644 --- a/examples/to-xml.c +++ b/examples/to-xml.c @@ -87,8 +87,8 @@ main (int argc, char *argv[]) int len = strlen (vgs[i]); int j; for (j = 0; lvs[j] != NULL; ++j) { - if (strncmp (lvs[j], "/dev/", 5) == 0 && - strncmp (&lvs[j][5], vgs[i], le...