Skip to content

Commit 0607b13

Browse files
committed
Fix compiler warning.
1 parent 6760e09 commit 0607b13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pseudo_node.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ static void garbage_collect(struct table *table)
10981098
struct entry *entry = table->entries[i], *prev = NULL;
10991099
while (entry != NULL)
11001100
{
1101-
int diff = abs(curr_time - entry->time);
1101+
long long int diff = llabs(curr_time - entry->time);
11021102
bool del = false;
11031103
switch (entry->type)
11041104
{
@@ -1359,7 +1359,7 @@ static size_t queue_get_addresses(struct table *table, struct buf *buf,
13591359

13601360
uint256_t addr_hsh = addr_hash(addr);
13611361
time_t addr_time = get_time(table, addr_hsh);
1362-
if (addr_time == 0 || abs(addr_time - curr_time) > 10800)
1362+
if (addr_time == 0 || llabs(addr_time - curr_time) > 10800)
13631363
continue;
13641364

13651365
uint32_t addr_time32 = (uint32_t)addr_time;

0 commit comments

Comments
 (0)