riched20: Avoid a TRUE:FALSE conditional expression.

Michael Stefaniuc mstefani at redhat.de
Tue Aug 14 16:15:13 CDT 2012


---
 dlls/riched20/txthost.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c
index bc96588..4b72d8b 100644
--- a/dlls/riched20/txthost.c
+++ b/dlls/riched20/txthost.c
@@ -141,8 +141,7 @@ DECLSPEC_HIDDEN BOOL WINAPI ITextHostImpl_TxSetScrollRange(ITextHost *iface, INT
 DECLSPEC_HIDDEN BOOL WINAPI ITextHostImpl_TxSetScrollPos(ITextHost *iface, INT fnBar, INT nPos, BOOL fRedraw)
 {
     ITextHostImpl *This = impl_from_ITextHost(iface);
-    int pos = SetScrollPos(This->hWnd, fnBar, nPos, fRedraw);
-    return (pos ? TRUE : FALSE);
+    return SetScrollPos(This->hWnd, fnBar, nPos, fRedraw) != 0;
 }
 
 DECLSPEC_HIDDEN void WINAPI ITextHostImpl_TxInvalidateRect(ITextHost *iface, LPCRECT prc, BOOL fMode)
-- 
1.7.7.6



More information about the wine-patches mailing list