gsm_timer: fix comparison of constant LONG_MAX with an integer
It does not make sense since INT_MAX is always less than LONG_MAX. Found by Clang [-Wtautological-constant-out-of-range-compare]. Change-Id: I9934e05aa050bf93b3c795376f5dca3a848a7e11
This commit is contained in:
parent
e525bf94ba
commit
4590b91728
|
@ -144,17 +144,14 @@ int *osmo_gsm_timers_nearest(void)
|
||||||
|
|
||||||
static void update_nearest(int *cand, int *current)
|
static void update_nearest(int *cand, int *current)
|
||||||
{
|
{
|
||||||
if (*cand != LONG_MAX) {
|
|
||||||
if (*cand > *current)
|
if (*cand > *current)
|
||||||
nearest = *cand - *current;
|
nearest = *cand - *current;
|
||||||
else {
|
else {
|
||||||
/* loop again inmediately */
|
/* loop again inmediately */
|
||||||
nearest = 0;
|
nearest = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nearest_p = &nearest;
|
nearest_p = &nearest;
|
||||||
} else {
|
|
||||||
nearest_p = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue