diff mbox series

[03/12] utils: fix float equal warning

Message ID 20200422003735.3891-3-rosenp@gmail.com (mailing list archive)
State New, archived
Headers show
Series [01/12] utils: fix compilation with C++98 | expand

Commit Message

Rosen Penev April 22, 2020, 12:37 a.m. UTC
Found with -Wfloat-equal

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
index 663d0254..066a336a 100644
--- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp
@@ -154,7 +154,7 @@  void fps_timestamps::determine_field(int fd, unsigned type)
 
 bool fps_timestamps::add_ts(double ts_secs, unsigned sequence, unsigned field)
 {
-	if (ts_secs == 0) {
+	if (ts_secs <= 0) {
 		struct timespec ts_cur;
 
 		clock_gettime(CLOCK_MONOTONIC, &ts_cur);