Skip to contentSkip to conversation

mtd-utils: Correct casting for final status report in flashcp

PATCH Applied Jonathan Fether 2 participants 2 messages Dec 14, 2016 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd-utils: Correct casting for final status report in flashcp

Add correct casting for filestat.st_size in flashcp.c. While the interim status updates had correct casting from commit 08b243, the final update was not.

---
 misc-utils/flashcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
misc-utils/flashcp.c +2 -2
index 6594a45..af3c88d 100644
@@ -386,8 +386,8 @@ int main (int argc,char *argv[])
 	if (flags & FLAG_VERBOSE)
 		log_printf (LOG_NORMAL,
 				"\rVerifying data: %lluk/%lluk (100%%)\n",
-				KB (filestat.st_size),
-				KB (filestat.st_size));
+				KB ((unsigned long long)filestat.st_size),
+				KB ((unsigned long long)filestat.st_size));
 	DEBUG("Verified %d / %lluk bytes\n",written,(unsigned long long)filestat.st_size);
 
 	exit (EXIT_SUCCESS);
Signature · 1 line
2.8.1.windows.1
#1 lore raw
Quoted 8 lines · Jonathan Fether

Add correct casting for filestat.st_size in flashcp.c. While the interim status updates had correct casting from commit 08b243, the final update was not.

---
 misc-utils/flashcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to mtd-utils.git.

Thanks,

David