smbd: Align integer types in reply_lockingX
authorVolker Lendecke <vl@samba.org>
Mon, 3 Jun 2019 09:16:33 +0000 (11:16 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 18 Jun 2019 12:54:01 +0000 (12:54 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/reply.c

index 8c9d5b2cab6e17ea8eb3e8a2f476702beec1969b..4780bfb04f134df29c6ea97b7743286790511e0d 100644 (file)
@@ -8272,7 +8272,7 @@ void reply_lockingX(struct smb_request *req)
        uint16_t num_ulocks;
        uint16_t num_locks;
        int32_t lock_timeout;
-       int i;
+       uint16_t i;
        const uint8_t *data;
        bool large_file_format;
        NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -8400,7 +8400,7 @@ void reply_lockingX(struct smb_request *req)
 
        /* Data now points at the beginning of the list
           of smb_unlkrng structs */
-       for(i = 0; i < (int)num_ulocks; i++) {
+       for (i = 0; i < num_ulocks; i++) {
                ulocks[i].smblctx = get_lock_pid(data, i, large_file_format);
                ulocks[i].count = get_lock_count(data, i, large_file_format);
                ulocks[i].offset = get_lock_offset(data, i, large_file_format);
@@ -8442,7 +8442,7 @@ void reply_lockingX(struct smb_request *req)
                return;
        }
 
-       for(i = 0; i < (int)num_locks; i++) {
+       for (i = 0; i < num_locks; i++) {
                locks[i].smblctx = get_lock_pid(data, i, large_file_format);
                locks[i].count = get_lock_count(data, i, large_file_format);
                locks[i].offset = get_lock_offset(data, i, large_file_format);