diff options
author | Teddy <ted.sybil@gmail.com> | 2014-05-04 11:41:39 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2014-05-04 11:41:39 +0800 |
commit | 5aba86743d63a9d7000ce4e410ff7c61bcb0547f (patch) | |
tree | d96984551fb4c628e539b0e421ede0ad88080a6a /printf.c | |
parent | 5f8c8cb8293ecdd76a9fda30a9a7fdf7b89232cd (diff) |
argument opt has been postponed
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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++); |