From 1862a991d824addf7aa498b95ba5e330102dd35e Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Thu, 4 Feb 2021 18:30:29 +0100 Subject: [PATCH] Remove useless code. The routine was originaly used in code for resetting default argument values. It was used in cli plugins related code where we needed to parse command line arguments twice. --- src/cryptsetup.c | 2 -- src/cryptsetup_args.h | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 3f1ac3e3..bc9a888b 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -52,8 +52,6 @@ void tools_cleanup(void) free(keyfiles[--keyfiles_count]); total_keyfiles = 0; - - args_reset_default_values(tool_core_args); } static const char *uuid_or_device_header(const char **data_device) diff --git a/src/cryptsetup_args.h b/src/cryptsetup_args.h index 378ea520..a5a4137f 100644 --- a/src/cryptsetup_args.h +++ b/src/cryptsetup_args.h @@ -93,15 +93,4 @@ static struct tools_arg tool_core_args[] = { { NULL, false, CRYPT_ARG_BOOL }, /* #undef ARG }; -static inline void args_reset_default_values(struct tools_arg *args) -{ - static const struct tools_arg tmp[] = { { NULL, false, CRYPT_ARG_BOOL }, // UNUSED - #define ARG(A, B, C, D, E, F, G, H ) { A, false, F, G, H }, - #include "cryptsetup_arg_list.h" - #undef ARG - }; - - memcpy(args, tmp, sizeof(tmp)); -} - #endif