[2/2] server: Remove a not necessary check for 'current' being not NULL.

Dmitry Timoshkov dmitry at baikal.ru
Mon May 13 02:44:49 CDT 2013


'current' is already dereferenced twice before this point.
---
 server/request.c | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/server/request.c b/server/request.c
index f78026a..dc95867 100644
--- a/server/request.c
+++ b/server/request.c
@@ -248,20 +248,17 @@ static void call_req_handler( struct thread *thread )
     else
         set_error( STATUS_NOT_IMPLEMENTED );
 
-    if (current)
+    if (current->reply_fd)
     {
-        if (current->reply_fd)
-        {
-            reply.reply_header.error = current->error;
-            reply.reply_header.reply_size = current->reply_size;
-            if (debug_level) trace_reply( req, &reply );
-            send_reply( &reply );
-        }
-        else
-        {
-            current->exit_code = 1;
-            kill_thread( current, 1 );  /* no way to continue without reply fd */
-        }
+        reply.reply_header.error = current->error;
+        reply.reply_header.reply_size = current->reply_size;
+        if (debug_level) trace_reply( req, &reply );
+        send_reply( &reply );
+    }
+    else
+    {
+        current->exit_code = 1;
+        kill_thread( current, 1 );  /* no way to continue without reply fd */
     }
     current = NULL;
 }
-- 
1.8.2.2




More information about the wine-patches mailing list