projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dc5035
)
Eliminate 'unnecessary comparison of static strings' cppcheck warning
author
Ivan Maidanski
<ivmai@mail.ru>
Thu, 13 Oct 2016 08:16:23 +0000
(11:16 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Thu, 13 Oct 2016 08:17:37 +0000
(11:17 +0300)
* tools/if_mach.c (main): Replace strcmp(x, "")!=0 with strlen(x)>0.
tools/if_mach.c
patch
|
blob
|
history
diff --git
a/tools/if_mach.c
b/tools/if_mach.c
index
94053a6
..
f99d164
100644
(file)
--- a/
tools/if_mach.c
+++ b/
tools/if_mach.c
@@
-9,7
+9,7
@@
int main(int argc, char **argv)
{
if (argc < 4) goto Usage;
if (strcmp(MACH_TYPE, argv[1]) != 0) return(0);
- if (str
cmp(OS_TYPE, "") != 0 && strcmp(argv[2], "") !=
0
+ if (str
len(OS_TYPE) > 0 && strlen(argv[2]) >
0
&& strcmp(OS_TYPE, argv[2]) != 0) return(0);
fprintf(stderr, "^^^^Starting command^^^^\n");
fflush(stdout);