Skip to content
Snippets Groups Projects
Commit c8be6a9c authored by Hans Verkuil's avatar Hans Verkuil
Browse files

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent fbc9c1cf
No related branches found
No related tags found
No related merge requests found
...@@ -354,7 +354,7 @@ void print_timers(struct node *node) ...@@ -354,7 +354,7 @@ void print_timers(struct node *node)
printf("source: %s, ", source.c_str()); printf("source: %s, ", source.c_str());
if (t.recording_seq) if (t.recording_seq)
printf("rec-seq: 0x%x, ", 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: "); printf("Total media space available for recording: ");
if (node->state.media_space_available >= 0) if (node->state.media_space_available >= 0)
......
...@@ -88,7 +88,7 @@ struct node { ...@@ -88,7 +88,7 @@ struct node {
struct Timer { struct Timer {
time_t start_time; time_t start_time;
time_t duration; /* In seconds. */ int duration; /* In seconds. */
__u8 recording_seq; __u8 recording_seq;
struct cec_op_record_src src; struct cec_op_record_src src;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment