summaryrefslogtreecommitdiffstats
path: root/libc/stdio
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-10-19 14:46:05 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-10-19 14:46:05 +0200
commit984e74b6df47fe33622a06e6995324f706b8f936 (patch)
tree33298a1cc20f4b0833ef9f02bea2a4331547745d /libc/stdio
parent7da684a4613809f430ed6f157f059c35c782da9e (diff)
downloaduClibc-alpine-984e74b6df47fe33622a06e6995324f706b8f936.tar.bz2
uClibc-alpine-984e74b6df47fe33622a06e6995324f706b8f936.tar.xz
_vfprintf.c: de-obfuscate badly twisted fragment. no code changes.
objdump confirms that I did not mess it up. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'libc/stdio')
-rw-r--r--libc/stdio/_vfprintf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c
index 721efe2f7..8c5e0e76c 100644
--- a/libc/stdio/_vfprintf.c
+++ b/libc/stdio/_vfprintf.c
@@ -1059,16 +1059,14 @@ int attribute_hidden _ppfs_parsespec(ppfs_t *ppfs)
}
#endif
#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__
-
/* Handle custom arg -- WARNING -- overwrites p!!! */
ppfs->conv_num = CONV_custom0;
p = _custom_printf_spec;
do {
if (*p == *fmt) {
- if ((ppfs->num_data_args
- = ((*_custom_printf_arginfo[(int)(p-_custom_printf_spec)])
- (&(ppfs->info), MAX_ARGS_PER_SPEC, argtype+2)))
- > MAX_ARGS_PER_SPEC) {
+ printf_arginfo_function *fp = _custom_printf_arginfo[(int)(p - _custom_printf_spec)];
+ ppfs->num_data_args = fp(&(ppfs->info), MAX_ARGS_PER_SPEC, argtype + 2);
+ if (ppfs->num_data_args > MAX_ARGS_PER_SPEC) {
break; /* Error -- too many args! */
}
goto DONE;