X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flibcore%2Flc_appendable.c;h=a2806edb9fbc2f7b570748836b1d1287332c3ef1;hb=bdc59608633f59b0541a04883c24d19b1bc0ffae;hp=65503afbc95d10cadd048a4deb100446f54d9182;hpb=ce6161a7e42a48f7422b7babcc64d8ace18e2687;p=libfirm diff --git a/ir/libcore/lc_appendable.c b/ir/libcore/lc_appendable.c index 65503afbc..a2806edb9 100644 --- a/ir/libcore/lc_appendable.c +++ b/ir/libcore/lc_appendable.c @@ -32,8 +32,8 @@ int lc_appendable_snwadd(lc_appendable_t *app, const char *str, size_t len, unsigned int width, int left_just, char pad) { int res = 0; - int i; - int to_pad = width - len; + size_t i; + size_t to_pad = width > len ? width - len : 0; /* If not left justified, pad left */ for (i = 0; !left_just && i < to_pad; ++i)