[PATCH] remove superflous NULL checks.

Marcus Meissner marcus at jet.franken.de
Sun Apr 8 11:11:47 CDT 2007


Coverity spotted that while we check attr
for NULL here, it is later dereferenced without
any checking.

I just removed the attr checks for now.

Ciao, Marcus
---
 dlls/ntdll/file.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 65710c5..b035c40 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2108,8 +2108,8 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( P
     SERVER_START_REQ( create_named_pipe )
     {
         req->access  = access;
-        req->attributes = (attr) ? attr->Attributes : 0;
-        req->rootdir = attr ? attr->RootDirectory : 0;
+        req->attributes = attr->Attributes;
+        req->rootdir = attr->RootDirectory;
         req->options = options;
         req->flags = 
             (pipe_type) ? NAMED_PIPE_MESSAGE_STREAM_WRITE : 0 |
-- 
1.4.3.4



More information about the wine-patches mailing list