summaryrefslogtreecommitdiffstats
path: root/fish/destpaths.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 /fish/destpaths.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 'fish/destpaths.c')
-rw-r--r--fish/destpaths.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fish/destpaths.c b/fish/destpaths.c
index 9a3da82b..02e9f223 100644
--- a/fish/destpaths.c
+++ b/fish/destpaths.c
@@ -168,7 +168,7 @@ complete_dest_paths_generator (const char *text, int state)
if (strcmp (dirents->val[i].name, ".") != 0 &&
strcmp (dirents->val[i].name, "..") != 0) {
- if (strcmp (dir, "/") == 0)
+ if (STREQ (dir, "/"))
err = asprintf (&p, "/%s", dirents->val[i].name);
else
err = asprintf (&p, "%s/%s", dir, dirents->val[i].name);