diff options
author | Uli Heilmeier <uh@heilmeier.eu> | 2016-09-24 11:17:17 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-09-24 22:49:58 +0000 |
commit | cacb4a428715b6a77ddee50d87d5dffe1f83557c (patch) | |
tree | 527ae752ddbf4507b0f87edc611dac6a36acf48a /editcap.c | |
parent | 17546ad88378fbeaad25e571e0fa35e7a5bfa622 (diff) |
Editcap: Fix comparsion between signed and unsigned int
secs_per_block is a unsigned integer. Therefore we can't
compare a signed integer with it.
Change-Id: Ic965a88e0e704e296c4af9193ca4a3504173ae36
Reviewed-on: https://code.wireshark.org/review/17901
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1399,8 +1399,8 @@ main(int argc, char *argv[]) block_start = phdr->ts; } if (secs_per_block != 0) { - while ((phdr->ts.secs - block_start.secs > secs_per_block) - || (phdr->ts.secs - block_start.secs == secs_per_block + while (((guint32)(phdr->ts.secs - block_start.secs) > secs_per_block) + || ((guint32)(phdr->ts.secs - block_start.secs) == secs_per_block && phdr->ts.nsecs >= block_start.nsecs )) { /* time for the next file */ if (!wtap_dump_close(pdh, &write_err)) { |