git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use STREQ, not strcmp: part 1
[libguestfs.git]
/
fuse
/
dircache.c
diff --git
a/fuse/dircache.c
b/fuse/dircache.c
index
545b9f3
..
1028926
100644
(file)
--- a/
fuse/dircache.c
+++ b/
fuse/dircache.c
@@
-100,7
+100,7
@@
gen_compare (void const *x, void const *y)
{
struct lsc_entry const *a = x;
struct lsc_entry const *b = y;
{
struct lsc_entry const *a = x;
struct lsc_entry const *b = y;
- return
strcmp (a->pathname, b->pathname) == 0
;
+ return
STREQ (a->pathname, b->pathname)
;
}
static void
}
static void
@@
-250,7
+250,7
@@
lsc_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
free (entry);
return -1;
}
- if (
strcmp (path, "/") == 0
)
+ if (
STREQ (path, "/")
)
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
@@
-285,7
+285,7
@@
xac_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
free (entry);
return -1;
}
- if (
strcmp (path, "/") == 0
)
+ if (
STREQ (path, "/")
)
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
@@
-320,7
+320,7
@@
rlc_insert (const char *path, const char *name, time_t now,
free (entry);
return -1;
}
free (entry);
return -1;
}
- if (
strcmp (path, "/") == 0
)
+ if (
STREQ (path, "/")
)
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);
snprintf (entry->pathname, len, "/%s", name);
else
snprintf (entry->pathname, len, "%s/%s", path, name);