1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4
Douglas Bagnall c98bdf2494 smbd/service_stream: connection processing flag is not really bool
The warning is:

../source4/smbd/service_stream.c: In function ‘stream_io_handler’:
../source4/smbd/service_stream.c:94:18: warning: increment of a boolean expression [-Wbool-operation]
  conn->processing++;
                    ^~
../source4/smbd/service_stream.c💯18: warning: decrement of a boolean expression [-Wbool-operation]
  conn->processing--;
                    ^~

while the code in question looks like:

	conn->processing++;
	if (flags & TEVENT_FD_WRITE) {
		conn->ops->send_handler(conn, flags);
	} else if (flags & TEVENT_FD_READ) {
		conn->ops->recv_handler(conn, flags);
	}
	conn->processing--;

If this is never going to be nested, processing can be bool and the ++
and -- can be true/false assignments. But it seems possible that these
might be nested so it is better to go the other way.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Dec  1 00:28:05 CET 2016 on sn-devel-144
2016-12-01 00:28:05 +01:00
..
auth doc: Add doxygen for functions in srv_keytab.c 2016-11-22 02:10:16 +01:00
build/pasn1
cldap_server Avoid including libds/common/roles.h in public loadparm.h header. 2016-01-13 04:43:23 +01:00
client s4:client: fix O3 error unused result of of chdir and system 2016-05-13 00:16:16 +02:00
cluster Remove callers of lp_use_ntdb 2015-03-17 11:30:51 +01:00
dns_server dlz-bind: Add support for BIND 9.11.x 2016-10-27 23:53:13 +02:00
dsdb source4: Change to use lib/util/access functions. 2016-11-16 16:35:12 +01:00
echo_server Avoid including libds/common/roles.h in public loadparm.h header. 2016-01-13 04:43:23 +01:00
heimdal HEIMDAL:lib/krb5: destroy a memory ccache on reinit 2016-10-12 20:54:08 +02:00
heimdal_build Wrap krb5_cc_copy_creds and krb5_cc_copy_cache 2016-07-25 21:27:57 +02:00
include lib: Remove global xfile.h includes 2016-11-20 06:23:19 +01:00
kdc s4-kdc: Fix Coverity ID #1373385 (OVERRUN) 2016-09-29 22:16:52 +02:00
ldap_server s4:ldap_server: don't use gensec_want_feature(gensec_security, GENSEC_FEATURE_{SIGN,SEAL}) as server 2016-10-26 11:20:12 +02:00
lib lib/registry/regf: better initialise nk_block 2016-11-30 20:36:24 +01:00
libcli pyerrors: Add PyErr_Set{WERROR,HRESULT,NTSTATUS}_and_string() 2016-11-04 04:41:19 +01:00
libnet python-libnet: Use new NTSTATUSError, WERRORError and DsExtendedError exceptions 2016-11-04 04:41:19 +01:00
librpc librpc: Introduce cab.idl 2016-11-24 20:24:26 +01:00
nbt_server dlist: remove unneeded type argument from DLIST_ADD_END() 2016-02-06 21:48:17 +01:00
ntp_signd build: Build with system md5.h on OpenIndiana 2013-06-19 21:32:36 +02:00
ntvfs wbclient: "ev" is no longer used in wbc_xids_to_sids 2016-09-28 00:04:36 +02:00
param s4:param add log_level function to retrieve log level in Python code 2016-09-14 19:31:20 +02:00
rpc_server s4-rpc_server: Use DCERPC_NCA_S_UNKNOWN_IF for fault code 2016-10-26 11:20:20 +02:00
script find_unused_macros: Remove obsolete script that finds unused macros. 2014-08-31 21:21:13 +02:00
scripting samba_dnsupdate: Raise after the error count is incremented 2016-11-22 05:59:40 +01:00
selftest selftest: Add test for link and deleted link behaviour in dbcheck 2016-11-22 02:10:16 +01:00
setup dsdb: Add python hooks to allocate a RID set and allocate a RID pool 2016-11-04 04:41:18 +01:00
smb_server pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID 2016-08-19 09:35:14 +02:00
smbd smbd/service_stream: connection processing flag is not really bool 2016-12-01 00:28:05 +01:00
torture s4-torture: Add LZX compressed cabinet test 2016-11-25 00:17:02 +01:00
utils ntlm_auth4: Remove it 2016-11-29 02:18:37 +01:00
web_server python: Remove Python 2.4 support macros 2016-01-07 23:33:10 +01:00
winbind s4-winbindd: Remove the winbind rewrite from the samba4 effort 2015-06-24 22:34:57 +02:00
wrepl_server dlist: remove unneeded type argument from DLIST_ADD_END() 2016-02-06 21:48:17 +01:00
.clang_complete
.valgrind_suppressions
wscript_build Do not install smbclient4 and nmblookup4 2014-04-15 03:25:13 +02:00