cangen: don't compare floating-point gap with ‘==’
Fixes the following warning: | cangen.c:524:7: warning: comparing floating-point with ‘==’ or ‘!=’ is unsafe [-Wfloat-equal] | 524 | if (gap && burst_sent_count >= burst_count) /* gap == 0 => performance test :-] */ | | ^~~ Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>pull/386/head
parent
a18337b102
commit
213a814da6
3
cangen.c
3
cangen.c
|
|
@ -521,7 +521,8 @@ resend:
|
||||||
}
|
}
|
||||||
|
|
||||||
burst_sent_count++;
|
burst_sent_count++;
|
||||||
if (gap && burst_sent_count >= burst_count) /* gap == 0 => performance test :-] */
|
if ((ts.tv_sec || ts.tv_nsec) &&
|
||||||
|
burst_sent_count >= burst_count)
|
||||||
if (nanosleep(&ts, NULL))
|
if (nanosleep(&ts, NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue