From 1838a8df596ae2625c83f5001bf7d5c66ed2bbe7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 21 May 2019 09:17:24 +0200 Subject: [PATCH] smbd: Avoid casts in smbd_do_locking() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/reply.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 42cf4c908eb..2388fae1b3c 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -8096,13 +8096,13 @@ NTSTATUS smbd_do_locking(struct smb_request *req, for(i = 0; i < (int)num_locks; i++) { struct smbd_lock_element *e = &locks[i]; - DEBUG(10,("smbd_do_locking: lock start=%.0f, len=%.0f for smblctx " - "%llu, file %s timeout = %d\n", - (double)e->offset, - (double)e->count, - (unsigned long long)e->smblctx, + DBG_DEBUG("lock start=%"PRIu64", len=%"PRIu64" for smblctx " + "%"PRIu64", file %s timeout = %"PRIi32"\n", + e->offset, + e->count, + e->smblctx, fsp_str_dbg(fsp), - (int)timeout)); + timeout); if (type & LOCKING_ANDX_CANCEL_LOCK) { struct blocking_lock_record *blr = NULL; @@ -8261,8 +8261,10 @@ NTSTATUS smbd_do_locking(struct smb_request *req, return status; } - DEBUG(3, ("smbd_do_locking: %s type=%d num_locks=%d\n", - fsp_fnum_dbg(fsp), (unsigned int)type, num_locks)); + DBG_NOTICE("%s type=%"PRIu8" num_locks=%"PRIu16"\n", + fsp_fnum_dbg(fsp), + type, + num_locks); return NT_STATUS_OK; } -- 2.47.3