Use int64_t to represent the offset
Using size_t causes undefined behavior when the number is negative.
This commit is contained in:
parent
34a823f36d
commit
5c5f9f0f1a
@ -395,7 +395,7 @@ parse_clkoff_entry(struct loom *looms, struct clkoff_entry *entry)
|
|||||||
size_t matches = 0;
|
size_t matches = 0;
|
||||||
|
|
||||||
/* Use the median as the offset */
|
/* Use the median as the offset */
|
||||||
size_t offset = entry->median;
|
int64_t offset = (int64_t) entry->median;
|
||||||
const char *host = entry->name;
|
const char *host = entry->name;
|
||||||
|
|
||||||
struct loom *loom;
|
struct loom *loom;
|
||||||
|
Loading…
Reference in New Issue
Block a user