aboutsummaryrefslogtreecommitdiff
path: root/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'printf.c')
-rw-r--r--printf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/printf.c b/printf.c
index 488c0d5..6d3330b 100644
--- a/printf.c
+++ b/printf.c
@@ -1,5 +1,6 @@
int printf(char *fmt) {
char *arg, ch;
+ int len, x;
arg = (int)&fmt + sizeof(char*);
while ((ch = *fmt))
{
@@ -14,7 +15,7 @@ int printf(char *fmt) {
__print_string(*(char **)arg);
else
{
- int len, x = *(int *)arg;
+ x = *(int *)arg;
if (!x) len = 1;
else
for (len = 0; x; x /= 10, len++);