1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

ctdb-daemon: Avoid signed/unsigned comparison by casting

Compiling with -Wsign-compare complains:

 1047 |  &&  (call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) {
      |                     ^~

struct ctdb_call is a protocol element, so we can't simply change it.

Found by csbuild.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Aug 14 10:29:59 UTC 2019 on sn-devel-184
This commit is contained in:
Martin Schwenke 2019-08-01 10:58:42 +10:00 committed by Amitay Isaacs
parent 4bdfbbd8d4
commit 6c9d1f855e

View File

@ -1044,7 +1044,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
}
}
if ((c->flags & CTDB_WANT_READONLY)
&& (call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) {
&& ((unsigned int)call->call_id == CTDB_FETCH_WITH_HEADER_FUNC)) {
TDB_DATA tdata;
tdata = tdb_fetch(ctdb_db->rottdb, call->key);