From cab9ca66458b5a02e697ed51bee593b1e16f3f57 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Fri, 27 Nov 2020 18:51:45 +0100 Subject: [PATCH] src/luks.c: improve code readability --- src/luks.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/luks.c b/src/luks.c index 53b06607..7570f2ea 100644 --- a/src/luks.c +++ b/src/luks.c @@ -38,11 +38,12 @@ static void set_LUKS_info(const struct luks_phdr *sb, partition_t *partition) { + const unsigned int version=be16(sb->version); partition->upart_type=UP_LUKS; if(partition->part_size > 0) - sprintf(partition->info,"LUKS %u", be16(sb->version)); + sprintf(partition->info,"LUKS %u", version); else - sprintf(partition->info,"LUKS %u (Data size unknown)", be16(sb->version)); + sprintf(partition->info,"LUKS %u (Data size unknown)", version); } static int test_LUKS(const disk_t *disk_car, const struct luks_phdr *sb, const partition_t *partition, const int dump_ind)