diff options
author | Jim Meyering <meyering@redhat.com> | 2009-11-09 14:30:11 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-11-09 22:34:16 +0100 |
commit | 9a8889e4d0c532b9f77af3a9cc7aae06adebfb83 (patch) | |
tree | e2d7910ea5b028ed2628b8006f209eea843458e5 /capitests | |
parent | 3e70b34eed5a48640e20fbf6dcba774aaace1f3c (diff) | |
download | libguestfs-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 'capitests')
-rw-r--r-- | capitests/test-command.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/capitests/test-command.c b/capitests/test-command.c index d451ebe6..c43353d4 100644 --- a/capitests/test-command.c +++ b/capitests/test-command.c @@ -30,27 +30,27 @@ int main (int argc, char *argv[]) { if (argc > 1) { - if (strcmp (argv[1], "1") == 0) { + if (STREQ (argv[1], "1")) { printf ("Result1"); - } else if (strcmp (argv[1], "2") == 0) { + } else if (STREQ (argv[1], "2")) { printf ("Result2\n"); - } else if (strcmp (argv[1], "3") == 0) { + } else if (STREQ (argv[1], "3")) { printf ("\nResult3"); - } else if (strcmp (argv[1], "4") == 0) { + } else if (STREQ (argv[1], "4")) { printf ("\nResult4\n"); - } else if (strcmp (argv[1], "5") == 0) { + } else if (STREQ (argv[1], "5")) { printf ("\nResult5\n\n"); - } else if (strcmp (argv[1], "6") == 0) { + } else if (STREQ (argv[1], "6")) { printf ("\n\nResult6\n\n"); - } else if (strcmp (argv[1], "7") == 0) { + } else if (STREQ (argv[1], "7")) { /* nothing */ - } else if (strcmp (argv[1], "8") == 0) { + } else if (STREQ (argv[1], "8")) { printf ("\n"); - } else if (strcmp (argv[1], "9") == 0) { + } else if (STREQ (argv[1], "9")) { printf ("\n\n"); - } else if (strcmp (argv[1], "10") == 0) { + } else if (STREQ (argv[1], "10")) { printf ("Result10-1\nResult10-2\n"); - } else if (strcmp (argv[1], "11") == 0) { + } else if (STREQ (argv[1], "11")) { printf ("Result11-1\nResult11-2"); } else { fprintf (stderr, "unknown parameter: %s\n", argv[1]); |