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>
This commit is contained in:
Marc Kleine-Budde
2022-12-07 15:26:42 +01:00
parent a18337b102
commit 213a814da6
+2 -1
View File
@@ -521,7 +521,8 @@ resend:
}
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))
return 1;