defs.h: add print_xlat32 macro
For those cases where inadvertent sign extension is possible. * defs.h (print_xlat32): New macro, a wrapper for print_xlat_ex.
This commit is contained in:
parent
0ae5745181
commit
f21f7033f9
2
defs.h
2
defs.h
@ -646,6 +646,8 @@ extern int sprintxval_ex(char *buf, size_t size, const struct xlat *xlat,
|
||||
extern void print_xlat_ex(uint64_t val, const char *str, enum xlat_style style);
|
||||
#define print_xlat(val_) \
|
||||
print_xlat_ex((val_), #val_, XLAT_STYLE_DEFAULT)
|
||||
#define print_xlat32(val_) \
|
||||
print_xlat_ex((uint32_t) (val_), #val_, XLAT_STYLE_DEFAULT)
|
||||
#define print_xlat_u(val_) \
|
||||
print_xlat_ex((val_), #val_, XLAT_STYLE_FMT_U)
|
||||
#define print_xlat_d(val_) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user