diff mbox series

[v3,3/4] xfs_fsr: correct type in fsrprintf() call

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

Commit Message

Bill O'Donnell June 14, 2024, 4 p.m. UTC
Use %lld instead of %d for howlong variable.

Coverity-id: 1596598

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

Comments

Christoph Hellwig June 14, 2024, 4:46 p.m. UTC | #1
On Fri, Jun 14, 2024 at 11:00:15AM -0500, Bill O'Donnell wrote:
> Use %lld instead of %d for howlong variable.
> 
> Coverity-id: 1596598
> 
> Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Darrick J. Wong June 14, 2024, 5:24 p.m. UTC | #2
On Fri, Jun 14, 2024 at 11:00:15AM -0500, Bill O'Donnell wrote:
> Use %lld instead of %d for howlong variable.
> 
> Coverity-id: 1596598
> 
> Signed-off-by: Bill O'Donnell <bodonnel@redhat.com>

Looks good now,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fsr/xfs_fsr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
> index fdd37756..06cc0552 100644
> --- a/fsr/xfs_fsr.c
> +++ b/fsr/xfs_fsr.c
> @@ -426,7 +426,8 @@ fsrallfs(char *mtab, time_t howlong, char *leftofffile)
>  	fsdesc_t *fsp;
>  	struct stat sb, sb2;
>  
> -	fsrprintf("xfs_fsr -m %s -t %d -f %s ...\n", mtab, howlong, leftofffile);
> +	fsrprintf("xfs_fsr -m %s -t %lld -f %s ...\n", mtab,
> +		  (long long)howlong, leftofffile);
>  
>  	endtime = starttime + howlong;
>  	fs = fsbase;
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index fdd37756..06cc0552 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -426,7 +426,8 @@  fsrallfs(char *mtab, time_t howlong, char *leftofffile)
 	fsdesc_t *fsp;
 	struct stat sb, sb2;
 
-	fsrprintf("xfs_fsr -m %s -t %d -f %s ...\n", mtab, howlong, leftofffile);
+	fsrprintf("xfs_fsr -m %s -t %lld -f %s ...\n", mtab,
+		  (long long)howlong, leftofffile);
 
 	endtime = starttime + howlong;
 	fs = fsbase;