From 3a05ab769dcccfdef7cf1f2a0843b1a2554855d9 Mon Sep 17 00:00:00 2001 From: Jan Polensky Date: Mon, 23 Mar 2026 18:50:45 +0100 Subject: [PATCH] dasdinfo: Apply code style improvements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Use __packed instead of __attribute__ ((packed)) - Rename EBCtoASC to ebc_to_asc following naming conventions - Consolidate multi-line error message into single line No functional changes. Reviewed-by: Jan Höppner Signed-off-by: Jan Polensky Signed-off-by: Jan Höppner --- dasdinfo/dasdinfo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dasdinfo/dasdinfo.c b/dasdinfo/dasdinfo.c index 611deaa7..5d86f44e 100644 --- a/dasdinfo/dasdinfo.c +++ b/dasdinfo/dasdinfo.c @@ -101,9 +101,9 @@ struct volume_label { char volkey[4]; char vollbl[4]; char volid[6]; -} __attribute__ ((packed)); +} __packed; -static char EBCtoASC[256] = { +static char ebc_to_asc[256] = { /* 0x00 NUL SOH STX ETX *SEL HT *RNL DEL */ 0x00, 0x01, 0x02, 0x03, 0x07, 0x09, 0x07, 0x7F, /* 0x08 -GE -SPS -RPT VT FF CR SO SI */ @@ -175,7 +175,7 @@ static char *dinfo_ebcdic_dec(char *source, char *target, int l) int i; for (i = 0; i < l; i++) - target[i] = EBCtoASC[(unsigned char)(source[i])]; + target[i] = ebc_to_asc[(unsigned char)(source[i])]; return target; } @@ -611,8 +611,7 @@ int main(int argc, char *argv[]) util_prg_print_version(); exit(EXIT_SUCCESS); default: - fprintf(stderr, "Try 'dasdinfo --help' for more " - "information.\n"); + fprintf(stderr, "Try 'dasdinfo --help' for more information.\n"); exit(1); } }