diff mbox series

[v2,4/4] xfs_repair: correct type of variable global_msgs.interval to time_t

Message ID 20240613211933.1169581-5-bodonnel@redhat.com (mailing list archive)
State Superseded, archived
Headers show
Series xfsprogs: coverity fixes | expand

Commit Message

Bill O'Donnell June 13, 2024, 9:09 p.m. UTC
Use time_t instead of int for interval field.

Coverity-id: 1596599

Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>
---
 repair/progress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong June 14, 2024, 3:54 a.m. UTC | #1
On Thu, Jun 13, 2024 at 04:09:18PM -0500, Bill O'Donnell wrote:
> Use time_t instead of int for interval field.
> 
> Coverity-id: 1596599
> 
> Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>

Hopefully the intervals never get that big, but yes, we could use a time
interval type instead of the ever popular int.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  repair/progress.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/repair/progress.c b/repair/progress.c
> index 2ce36cef..15455a99 100644
> --- a/repair/progress.c
> +++ b/repair/progress.c
> @@ -91,7 +91,7 @@ typedef struct msg_block_s {
>  	uint64_t	*done;
>  	uint64_t	*total;
>  	int		count;
> -	int		interval;
> +	time_t		interval;
>  } msg_block_t;
>  static msg_block_t 	global_msgs;
>  
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/repair/progress.c b/repair/progress.c
index 2ce36cef..15455a99 100644
--- a/repair/progress.c
+++ b/repair/progress.c
@@ -91,7 +91,7 @@  typedef struct msg_block_s {
 	uint64_t	*done;
 	uint64_t	*total;
 	int		count;
-	int		interval;
+	time_t		interval;
 } msg_block_t;
 static msg_block_t 	global_msgs;