diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-05-11 12:56:08 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-07 14:36:14 -0400 |
commit | 3a527337ce13160cf3805b8d58ba0c35c7331dc7 (patch) | |
tree | 78856b9f12a92a14c6167852fd4263a123a8e429 /lib/oid_registry.c | |
parent | c4ef00346d491c7d70c938e17f73c0850337546b (diff) |
vsprintf: Start consolidating printf_spec handling
printf_spec is right now something of a mess - it's a grab-bag of state
that's interpreted inconsistently by different code, and it's scattered
throughout vsprintf.c.
We'd like to get it out of the pretty-printers, and have it be solely
the responsibility of vsprintf()/vpr_buf(), the code that parses and
handles format strings.
Most of the code that uses printf_spec is only using it for a minimum &
maximum field width - that can be done at the toplevel by checking how
much we just printed, and padding or truncating it as necessary. This
patch takes those "simple" uses of printf_spec and moves them as far up
the call stack as possible.
This patch also renames some helpers and creates new ones that don't
take printf_spec:
- do_width_precision: new helper that handles with/precision of
printf_spec
- error_string -> error_string_spec
- check_pointer -> check_pointer_spec
- string -> string_spec
Next patches will be reducing/eliminating uses of the *_spec versions.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'lib/oid_registry.c')
0 files changed, 0 insertions, 0 deletions