diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2016-11-30 14:56:16 +1300 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2016-12-01 00:28:05 +0100 |
commit | c98bdf24941ad95250d79eeed26c57d600cedc7b (patch) | |
tree | de0bd2a4b8917a4acb390abb10cd05e22aa08021 /source4 | |
parent | 28eb49c7ede1c530f4c27fb4c136e88fd6ba7f93 (diff) | |
download | samba-c98bdf24941ad95250d79eeed26c57d600cedc7b.tar.gz |
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:100: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
Diffstat (limited to 'source4')
-rw-r--r-- | source4/smbd/service_stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h index e098a690f1f..a7d3def6eae 100644 --- a/source4/smbd/service_stream.h +++ b/source4/smbd/service_stream.h @@ -60,7 +60,7 @@ struct stream_connection { */ struct auth_session_info *session_info; - bool processing; + uint processing; const char *terminate; }; |