}
static noinline_for_stack
-char *special_hex_number(char *buf, char *end, unsigned long long num, int size)
+char *special_hex_number(struct printf_state *ps, unsigned long long num,
+ int size)
{
- struct printf_spec spec;
+ ps->spec.type = FORMAT_TYPE_PTR;
+ ps->spec.field_width = 2 + 2 * size; /* 0x + hex */
+ ps->spec.flags = SPECIAL | SMALL | ZEROPAD;
+ ps->spec.base = 16;
+ ps->spec.precision = -1;
- spec.type = FORMAT_TYPE_PTR;
- spec.field_width = 2 + 2 * size; /* 0x + hex */
- spec.flags = SPECIAL | SMALL | ZEROPAD;
- spec.base = 16;
- spec.precision = -1;
-
- return number(buf, end, num, spec);
+ printf_number(ps, num);
+ return ps->buf;
}
static void move_right(char *buf, char *end, unsigned len, unsigned spaces)
sprint_symbol_no_offset(sym, value);
printf_string(ps, sym);
- return ps->buf;
#else
- return special_hex_number(ps->buf, ps->end, value, sizeof(void *));
+ special_hex_number(ps, value, sizeof(void *));
#endif
+ return ps->buf;
}
static const struct printf_spec default_str_spec = {
return ptr_to_id(ps->buf, ps->end, addr, ps->spec);
}
- return special_hex_number(ps->buf, ps->end, num, size);
+ return special_hex_number(ps, num, size);
}
static noinline_for_stack
break;
}
- return special_hex_number(ps->buf, ps->end, num, size);
+ return special_hex_number(ps, num, size);
}
static noinline_for_stack