git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Fix inter-directory dependencies
[libguestfs.git]
/
daemon
/
file.c
diff --git
a/daemon/file.c
b/daemon/file.c
index
7854ade
..
252c02c
100644
(file)
--- a/
daemon/file.c
+++ b/
daemon/file.c
@@
-430,7
+430,7
@@
do_file (const char *path)
char *buf;
int len;
char *buf;
int len;
- if (
strncmp (path, "/dev/", 5) == 0
)
+ if (
STREQLEN (path, "/dev/", 5)
)
buf = (char *) path;
else {
buf = sysroot_path (path);
buf = (char *) path;
else {
buf = sysroot_path (path);
@@
-481,9
+481,9
@@
do_zfile (const char *method, const char *path)
FILE *fp;
char line[256];
FILE *fp;
char line[256];
- if (
strcmp (method, "gzip") == 0 || strcmp (method, "compress") == 0
)
+ if (
STREQ (method, "gzip") || STREQ (method, "compress")
)
zcat = "zcat";
zcat = "zcat";
- else if (
strcmp (method, "bzip2") == 0
)
+ else if (
STREQ (method, "bzip2")
)
zcat = "bzcat";
else {
reply_with_error ("zfile: unknown method");
zcat = "bzcat";
else {
reply_with_error ("zfile: unknown method");