Skip to content

Commit

Permalink
Fix signed an unsigned integers comparison
Browse files Browse the repository at this point in the history
Relates #169
  • Loading branch information
GeorgyKirichenko committed Apr 15, 2024
1 parent d5afdb0 commit 7d4ca70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataplane/worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4413,7 +4413,7 @@ inline void cWorker::balancer_ipv6_source(rte_ipv6_hdr* header,
random_ptr++;
}

uint8_t n_to_fill = RTE_MIN(sizeof(header->src_addr) - random_ptr, 4);
uint8_t n_to_fill = RTE_MIN(sizeof(header->src_addr) - random_ptr, (size_t)4);

/// Fill the first 4 (or less) bytes after the mask with random numbers.
rte_memcpy(&header->src_addr[random_ptr], &random_src, n_to_fill);
Expand Down

0 comments on commit 7d4ca70

Please sign in to comment.