lock_ref_count will always hold the old value prior to change. Thus it
would mean that if lock_ref_count is 0 the new value is already -1 which
is not expected here. Therefore it is better to make sure that it is
always greater than 0 rather than >= 0.
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 31 04:23:47 CEST 2018 on sn-devel-144
&lock_ref_count, -1);
SMB_ASSERT(NT_STATUS_IS_OK(status));
&lock_ref_count, -1);
SMB_ASSERT(NT_STATUS_IS_OK(status));
- SMB_ASSERT(lock_ref_count >= 0);
+ SMB_ASSERT(lock_ref_count > 0);
DEBUG(10,("lock_ref_count for file %s = %d\n",
fsp_str_dbg(fsp), (int)lock_ref_count));
DEBUG(10,("lock_ref_count for file %s = %d\n",
fsp_str_dbg(fsp), (int)lock_ref_count));