Michael Stefaniuc : msvcp100: Avoid FALSE:TRUE conditional expressions.

Alexandre Julliard julliard at winehq.org
Wed Nov 14 13:17:16 CST 2012


Module: wine
Branch: master
Commit: bdd9a6294de0d13f23ed21ca0073add417e12d0c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bdd9a6294de0d13f23ed21ca0073add417e12d0c

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Nov 14 12:29:59 2012 +0100

msvcp100: Avoid FALSE:TRUE conditional expressions.

---

 dlls/msvcp100/string.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcp100/string.c b/dlls/msvcp100/string.c
index 7faf95f..9771ace 100644
--- a/dlls/msvcp100/string.c
+++ b/dlls/msvcp100/string.c
@@ -189,7 +189,7 @@ static MSVCP_bool basic_string_char_inside(
 {
     char *cstr = basic_string_char_ptr(this);
 
-    return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE;
+    return ptr>=cstr && ptr<cstr+this->size;
 }
 
 /* ?_Tidy@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@IAEX_NI at Z */
@@ -474,7 +474,7 @@ static MSVCP_bool basic_string_wchar_inside(
 {
     wchar_t *cstr = basic_string_wchar_ptr(this);
 
-    return (ptr<cstr || ptr>=cstr+this->size) ? FALSE : TRUE;
+    return ptr>=cstr && ptr<cstr+this->size;
 }
 
 /* ?_Tidy@?$basic_string at _WU?$char_traits at _W@std@@V?$allocator at _W@2@@std@@IAEX_NI at Z */




More information about the wine-cvs mailing list