When sent file is less than 1KB, there is a divide-by zero error.
Check size less than 1KB to fix the issue.
Change-Id: Ie73fa6e9151f635a6420153c025654462238498c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
char c = progress[(sent_kb/30)%4];
fprintf(stderr, "\x1b[1A\x1b[16C%c sending %6uk/%6uk %3u%% block %-6d",
- c, sent_kb, total_kb, ((sent_kb*100)/total_kb), chunk_nmb);
+ c, sent_kb, total_kb, total_kb ? ((sent_kb*100)/total_kb) : 0,
+ chunk_nmb);
gettimeofday(¤t_time, NULL);