From 45532079c61df63697e6e4b5e6183c4663e0fbf0 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Fri, 5 Jan 2018 20:57:57 +0100 Subject: [PATCH] print_fields.h: rename PRINT_FIELD_UID to PRINT_FIELD_ID As uid is not the only thing that has a special treatment of the -1 value (and, as a result, needs special care), let's rename PRINT_FIELD_UID to PRINT_FIELD_ID and make PRINT_FIELD_UID its alias. * print_fields.h (PRINT_FIELD_ID): Rename from PRINT_FIELD_UID. (PRINT_FIELD_UID): Define to PRINT_FIELD_ID. --- print_fields.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/print_fields.h b/print_fields.h index 35859c99..b78e09a1 100644 --- a/print_fields.h +++ b/print_fields.h @@ -74,7 +74,11 @@ (dflt_)); \ } while (0) -#define PRINT_FIELD_UID(prefix_, where_, field_) \ +/* + * Generic "ID" printing. ID is considered unsigned except for the special value + * of -1. + */ +#define PRINT_FIELD_ID(prefix_, where_, field_) \ do { \ if (sign_extend_unsigned_to_ll((where_).field_) == -1LL) \ STRACE_PRINTF("%s%s=-1", (prefix_), #field_); \ @@ -83,6 +87,8 @@ zero_extend_signed_to_ull((where_).field_)); \ } while (0) +#define PRINT_FIELD_UID PRINT_FIELD_ID + #define PRINT_FIELD_STRING(prefix_, where_, field_, len_, style_) \ do { \ STRACE_PRINTF("%s%s=", (prefix_), #field_); \ -- 2.40.0