From 29842da1379ece83eae98ee786b475ae161f1687 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 9 Nov 2009 14:06:37 +0100 Subject: [PATCH] convert strcasecmp(...) != 0 to STRCASENEQ(...) git grep -E -l 'strcasecmp *\(.*!= ?0\b'|xargs \ perl -pi -e 's/\bstrcasecmp( ?\(.*?\)) != 0/STRCASENEQ$1/g' --- fish/fish.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fish/fish.c b/fish/fish.c index 9a89f55..cac4e4a 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1107,11 +1107,11 @@ int is_true (const char *str) { return - strcasecmp (str, "0") != 0 && - strcasecmp (str, "f") != 0 && - strcasecmp (str, "false") != 0 && - strcasecmp (str, "n") != 0 && - strcasecmp (str, "no") != 0; + STRCASENEQ (str, "0") && + STRCASENEQ (str, "f") && + STRCASENEQ (str, "false") && + STRCASENEQ (str, "n") && + STRCASENEQ (str, "no"); } /* Free strings from a non-NULL terminated char** */ -- 1.8.3.1