summaryrefslogtreecommitdiffstats
path: root/fuse/dircache.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-11-09 14:30:11 +0100
committerJim Meyering <meyering@redhat.com>2009-11-09 22:34:16 +0100
commit9a8889e4d0c532b9f77af3a9cc7aae06adebfb83 (patch)
treee2d7910ea5b028ed2628b8006f209eea843458e5 /fuse/dircache.c
parent3e70b34eed5a48640e20fbf6dcba774aaace1f3c (diff)
downloadlibguestfs-9a8889e4d0c532b9f77af3a9cc7aae06adebfb83.tar.gz
libguestfs-9a8889e4d0c532b9f77af3a9cc7aae06adebfb83.tar.xz
libguestfs-9a8889e4d0c532b9f77af3a9cc7aae06adebfb83.zip
use STREQ, not strcmp: part 1
git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
Diffstat (limited to 'fuse/dircache.c')
-rw-r--r--fuse/dircache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fuse/dircache.c b/fuse/dircache.c
index 545b9f38..10289260 100644
--- 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;
- return strcmp (a->pathname, b->pathname) == 0;
+ return STREQ (a->pathname, b->pathname);
}
static void
@@ -250,7 +250,7 @@ lsc_insert (const char *path, const char *name, time_t now,
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);
@@ -285,7 +285,7 @@ xac_insert (const char *path, const char *name, time_t now,
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);
@@ -320,7 +320,7 @@ rlc_insert (const char *path, const char *name, time_t now,
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);