summaryrefslogtreecommitdiff
path: root/progressmeter.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2019-05-03 06:06:30 +0000
committerDamien Miller <djm@mindrot.org>2019-05-08 18:42:43 +1000
commit62dd70613b77b229f53db3cc1c3e8a206fa2b582 (patch)
treed78652b33cf676fc294b80dc88ea224d96b5bd8f /progressmeter.c
parent62be1ffe5ffc68cfaac183320503c00a8c72e0b1 (diff)
upstream: Use the correct (according to POSIX) format for
left-justification in snmprintf. bz#3002, patch from velemas at gmail.com, ok markus@. OpenBSD-Commit-ID: 65d252b799be0cc8f68b6c47cece0a57bb00fea7
Diffstat (limited to 'progressmeter.c')
-rw-r--r--progressmeter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/progressmeter.c b/progressmeter.c
index e385c1254..0e58eddec 100644
--- a/progressmeter.c
+++ b/progressmeter.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: progressmeter.c,v 1.47 2019/01/24 16:52:17 dtucker Exp $ */ 1/* $OpenBSD: progressmeter.c,v 1.48 2019/05/03 06:06:30 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2003 Nils Nordman. All rights reserved. 3 * Copyright (c) 2003 Nils Nordman. All rights reserved.
4 * 4 *
@@ -169,8 +169,8 @@ refresh_progress_meter(int force_update)
169 file_len = win_size - 36; 169 file_len = win_size - 36;
170 if (file_len > 0) { 170 if (file_len > 0) {
171 buf[0] = '\r'; 171 buf[0] = '\r';
172 snmprintf(buf+1, sizeof(buf)-1 , &file_len, "%*s", 172 snmprintf(buf+1, sizeof(buf)-1, &file_len, "%-*s",
173 file_len * -1, file); 173 file_len, file);
174 } 174 }
175 175
176 /* percent of transfer done */ 176 /* percent of transfer done */