Skip to content

Commit

Permalink
[clang-tidy] fix misplaced cast
Browse files Browse the repository at this point in the history
Found with bugprone-misplaced-widening-cast

Reviewed-by: Petr Vorel <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb authored and pevik committed Apr 13, 2020
1 parent a333cb9 commit 17b68a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ping/ping_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void fill(struct ping_rts *rts, char *patp, unsigned char *packet, size_t packet

if (ii > 0) {
size_t kk;
size_t max = packet_size < (size_t)(8 + ii) ? 0 : packet_size - (8 + ii);
size_t max = packet_size < (size_t)ii + 8 ? 0 : packet_size - (size_t)ii + 8;

for (kk = 0; kk <= max; kk += ii)
for (jj = 0; jj < ii; ++jj)
Expand Down

0 comments on commit 17b68a8

Please sign in to comment.