1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

smb2_query_directory: make 'return true' explicit in smb2_query_directory_next_entry()

'return req' should do the same as 'return true' for a bool function,
it's implicitly expanded as 'return (req!=NULL)?true:false.

There's no point in that as 'req' is always a valid pointer.

This was most likely just a copy and paste bug.

So we make this explicit now and avoid that Coverity reports this:

CID 1438158:  Null pointer dereferences  (REVERSE_INULL)
Null-checking "req" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jul 31 14:20:49 CEST 2018 on sn-devel-144
This commit is contained in:
Stefan Metzmacher 2018-07-31 09:45:00 +02:00 committed by Volker Lendecke
parent f68b5ee75f
commit 8dac16e82d

View File

@ -718,7 +718,7 @@ last_entry_done:
tevent_req_set_callback(subreq,
smb2_query_directory_waited,
req);
return req;
return true;
}
tevent_req_done(req);