sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 892b8618cba92cd30a6cbd0546f3996ab8961105
parent 74a059930de88eba7c22f82174719e57ea85e8e2
Author: Quentin Rameau <quinq@fifth.space>
Date:   Mon Feb 29 15:35:13 +0100

printf: remove unnecessary string size test

Diffstat:
printf.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/printf.c b/printf.c @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { Rune *rarg; - size_t i, j, argi, lastargi, formatlen, arglen; + size_t i, j, argi, lastargi, formatlen; long long num; double dou; int cooldown = 0, width, precision; @@ -127,8 +127,7 @@ main(int argc, char *argv[]) printf("%*.*s", width, precision, arg); break; case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': - arglen = strlen(arg); - for (j = 0; j < arglen && isspace(arg[j]); j++); + for (j = 0; isspace(arg[j]); j++); if (arg[j] == '\'' || arg[j] == '\"') { arg += j + 1; unescape(arg);