From 7744b613d7043f5cfb1904e023c644a8795deba4 Mon Sep 17 00:00:00 2001 From: Hosam Elkoulak Date: Tue, 16 Jun 2026 17:26:27 +0200 Subject: [PATCH] Move declarations to the beginning of the block --- crypto/ascon/ascon-file-encrypt.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/crypto/ascon/ascon-file-encrypt.c b/crypto/ascon/ascon-file-encrypt.c index 8fcfbb18..e74d350c 100644 --- a/crypto/ascon/ascon-file-encrypt.c +++ b/crypto/ascon/ascon-file-encrypt.c @@ -453,6 +453,14 @@ int NoEcho(char* password) int main(int argc, char** argv) { int ret = ERROR; /* return value */ + const char* in; + int option; /* choice of how to run program */ + int inCheck = 0; + int outCheck = 0; + char choice = 'n'; + + + wc_AsconCtx* ctx = (wc_AsconCtx*) malloc(sizeof(wc_AsconCtx)); if (ctx == NULL) { printf("Memory allocation for ctx failed.\n"); @@ -468,15 +476,6 @@ int main(int argc, char** argv) ctx->outFile = NULL; - const char* in; - - int option; /* choice of how to run program */ - int inCheck = 0; - int outCheck = 0; - char choice = 'n'; - - - while ((option = getopt(argc, argv, "dei:o:")) != -1) { switch (option) { case 'd': /* if entered decrypt */