From: Eugene Syromyatnikov Date: Thu, 12 Apr 2018 22:57:46 +0000 (+0200) Subject: defs.h: add print_xlat32 macro X-Git-Tag: v4.23~327 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f21f7033f9fc31eda9b3f8d00638868a84e8d221;p=strace 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. --- diff --git a/defs.h b/defs.h index 6e9d5979..76c17a8b 100644 --- a/defs.h +++ b/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_) \