From: Jim Meyering Date: Mon, 9 Nov 2009 13:06:37 +0000 (+0100) Subject: convert strcasecmp(...) != 0 to STRCASENEQ(...) X-Git-Tag: 1.0.78~23 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=29842da1379ece83eae98ee786b475ae161f1687;p=libguestfs.git convert strcasecmp(...) != 0 to STRCASENEQ(...) git grep -E -l 'strcasecmp *\(.*!= ?0\b'|xargs \ perl -pi -e 's/\bstrcasecmp( ?\(.*?\)) != 0/STRCASENEQ$1/g' --- 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** */