projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc2e56c
)
No need to force to bool, when C does that automatically in the if statement. (#33045)
author
pi1024e
<49824824+pi1024e@users.noreply.github.com>
Mon, 9 Mar 2020 19:28:57 +0000
(15:28 -0400)
committer
GitHub
<noreply@github.com>
Mon, 9 Mar 2020 19:28:57 +0000
(20:28 +0100)
In C, the if statement checks if the value is 0 or not 0. !!, or forcing to 1 or 0, is unnecessary here.
src/mono/mono/mini/interp/whitebox.c
patch
|
blob
|
history
diff --git
a/src/mono/mono/mini/interp/whitebox.c
b/src/mono/mono/mini/interp/whitebox.c
index 24db2dc277bfe149167807e8855527f93c9d69a7..e000fa5d124a281dd28c1356ed5f008b179eb9fe 100644
(file)
--- a/
src/mono/mono/mini/interp/whitebox.c
+++ b/
src/mono/mono/mini/interp/whitebox.c
@@
-143,10
+143,8
@@
determine_verbose_level (TransformData *td)
mono_method_desc_free (desc);
if (match)
return 4;
- } else {
- if (strcmp (method->name, name) == 0)
- return 4;
- }
+ } else if (!strcmp (method->name, name))
+ return 4;
return 0;
}
@@
-223,7
+221,7
@@
main (int argc, char* argv[])
g_print ("test \"%s\": %d\n", ti->test_name, result);
free (td);
- if (
!!
result)
+ if (result)
test_failed++;
else
test_success++;