From c8be6a9c10d9f2f6f79320910acf34fe32b39be0 Mon Sep 17 00:00:00 2001 From: Hans Verkuil <hverkuil-cisco@xs4all.nl> Date: Fri, 19 Jul 2024 10:08:13 +0200 Subject: [PATCH] cec-follower: change type of struct Timer duration field to int Use int for this field instead of time_t since it is at most about 100*3600 seconds. It also avoids confusion about the size of time_t, since that can be 32 or 64 bits. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> --- utils/cec-follower/cec-follower.cpp | 2 +- utils/cec-follower/cec-follower.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/cec-follower/cec-follower.cpp b/utils/cec-follower/cec-follower.cpp index a7481aeaf..2ae244ce2 100644 --- a/utils/cec-follower/cec-follower.cpp +++ b/utils/cec-follower/cec-follower.cpp @@ -354,7 +354,7 @@ void print_timers(struct node *node) printf("source: %s, ", source.c_str()); if (t.recording_seq) printf("rec-seq: 0x%x, ", t.recording_seq); - printf("needs: %ld %s\n", t.duration, "MB."); /* 1MB per second. */ + printf("needs: %d %s\n", t.duration, "MB."); /* 1MB per second. */ } printf("Total media space available for recording: "); if (node->state.media_space_available >= 0) diff --git a/utils/cec-follower/cec-follower.h b/utils/cec-follower/cec-follower.h index 8328d9a74..b5a18fc80 100644 --- a/utils/cec-follower/cec-follower.h +++ b/utils/cec-follower/cec-follower.h @@ -88,7 +88,7 @@ struct node { struct Timer { time_t start_time; - time_t duration; /* In seconds. */ + int duration; /* In seconds. */ __u8 recording_seq; struct cec_op_record_src src; -- GitLab