libsmb: Fix a bunch of Coverity IDs
commit947cd1d17e680ea31a22fd98e1713ad02f2919ba
authorVolker Lendecke <vl@samba.org>
Mon, 19 Aug 2013 20:36:02 +0000 (19 22:36 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 30 Aug 2013 09:53:26 +0000 (30 11:53 +0200)
treea05108e27d07f6cb43acb07368d462fcd6e1bf6b
parent2fb817c55b0dca708b316e920f1be1d1ed708e68
libsmb: Fix a bunch of Coverity IDs

(fnum != -1) is always true, even if fnum=-1 was initialized. fnum is
a uint16, and the comparison first casts this to 65535, which is always
!= -1.

Also change the initialization to make it clearer what is happening here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 00:52:36 CEST 2013 on sn-devel-104

(cherry picked from commit 4f96d5753ffe6c446c46676ba31cd2a3722890a0)
source3/libsmb/cli_smb2_fnum.c