git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9353c62
)
convert strcasecmp(...) != 0 to STRCASENEQ(...)
author
Jim Meyering
<meyering@redhat.com>
Mon, 9 Nov 2009 13:06:37 +0000
(14:06 +0100)
committer
Jim Meyering
<meyering@redhat.com>
Mon, 9 Nov 2009 21:34:16 +0000
(22:34 +0100)
git grep -E -l 'strcasecmp *\(.*!= ?0\b'|xargs \
perl -pi -e 's/\bstrcasecmp( ?\(.*?\)) != 0/STRCASENEQ$1/g'
fish/fish.c
patch
|
blob
|
history
diff --git
a/fish/fish.c
b/fish/fish.c
index
9a89f55
..
cac4e4a
100644
(file)
--- 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** */