aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2018-10-28 11:33:27 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-11-02 11:07:04 +0100
commite4f2a5bc1b6146f96a8a5778a13ab3d0c6071040 (patch)
tree9d6ae7c179884ad0109f6c95b359cd4a9c41f236 /lib
parent2c5ec339ea67f43ac370ae77636a0f915cc5fbeb (diff)
mprintf: avoid unsigned integer overflow warning
The overflow has no real world impact. Just avoid it for "best practice". Code change suggested by "The Infinnovation Team" and Daniel Stenberg. Closes #3184
Diffstat (limited to 'lib')
-rw-r--r--lib/mprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index d2d91d743..e19093678 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -835,7 +835,7 @@ static int dprintf_formatf(
while(width-- > 0)
OUTCHAR(' ');
- while((len-- > 0) && *str)
+ for(; len && *str; len--)
OUTCHAR(*str++);
if(p->flags&FLAGS_LEFT)
while(width-- > 0)