# HG changeset patch # User Matti Hamalainen # Date 1456386593 -7200 # Node ID 77201824790c28887ba04bc6fec059849e23affe # Parent d7f43fce0dce75ad64b81e36948dc32581d68d54 Use th_printf_vput_repch() where appropriate. diff -r d7f43fce0dce -r 77201824790c th_string.c --- a/th_string.c Thu Feb 25 09:49:28 2016 +0200 +++ b/th_string.c Thu Feb 25 09:49:53 2016 +0200 @@ -216,12 +216,8 @@ if (f_sign && (f_flags & TH_PF_ZERO) == 0 && (ret = vputch(ctx, f_sign)) == EOF) return ret; - while (f_prec-- > 0) - { - int ret; - if ((ret = vputch(ctx, '0')) == EOF) - return ret; - } + if ((ret = th_printf_vput_repch(ctx, vputch, f_prec, '0')) == EOF) + return ret; // Output the value while (f_len-- > 0)