kernel32: Remove always true if conditions (coccinellery)

Michael Stefaniuc mstefani at redhat.de
Wed Feb 15 03:51:31 CST 2017


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
2ca58402 introduced parameter checks and made those if checks redundant.


 dlls/kernel32/time.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index 09d06e8..fbe5811 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -1308,11 +1308,8 @@ BOOL WINAPI FileTimeToDosDateTime( const FILETIME *ft, LPWORD fatdate,
     }
     unixtime = t;
     tm = gmtime( &unixtime );
-    if (fattime)
-        *fattime = (tm->tm_hour << 11) + (tm->tm_min << 5) + (tm->tm_sec / 2);
-    if (fatdate)
-        *fatdate = ((tm->tm_year - 80) << 9) + ((tm->tm_mon + 1) << 5)
-                   + tm->tm_mday;
+    *fattime = (tm->tm_hour << 11) + (tm->tm_min << 5) + (tm->tm_sec / 2);
+    *fatdate = ((tm->tm_year - 80) << 9) + ((tm->tm_mon + 1) << 5) + tm->tm_mday;
     return TRUE;
 }
 
-- 
2.9.3



More information about the wine-patches mailing list