- if (rjust) {
- if (remaining > 0) {
- /* copy string to the right */
- charstring_t copy = charstring_copy (dest);
-
- /* add padding at the beginning */
- charstring_clear (dest);
- for (; remaining > 0; --remaining) {
- charstring_push_back (dest, fill);
- }
-
- charstring_append (dest, copy);
+ while (remaining-- > 0) {
+ charstring_push_back(dest, fill);
+ }