libsmb: Fix a bunch of Coverity IDs
commit4f96d5753ffe6c446c46676ba31cd2a3722890a0
authorVolker Lendecke <vl@samba.org>
Mon, 19 Aug 2013 20:36:02 +0000 (19 22:36 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 19 Aug 2013 22:52:36 +0000 (20 00:52 +0200)
tree9266bd0180e58ce662f0f24b61e4c6590e2d5b19
parent74829fecd7a4e806ee441cd75141bede2eefef1a
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
source3/libsmb/cli_smb2_fnum.c