created function for deallocating outputFlags

This commit is contained in:
Václav Šmejkal 2022-05-08 19:54:46 +02:00
parent 0389ca0226
commit 7b5f1ba9b6
2 changed files with 9 additions and 4 deletions

View File

@ -5,6 +5,7 @@
void checkVersion(inputFlags flags); //THIS FUNCTION CHECKS IF LATEST VERSION OF WHY2 IS USED void checkVersion(inputFlags flags); //THIS FUNCTION CHECKS IF LATEST VERSION OF WHY2 IS USED
void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize); //GENERATES ARRAY FOR ENCRYPTION/DECRYPTION void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize); //GENERATES ARRAY FOR ENCRYPTION/DECRYPTION
void deallocateOutput(outputFlags flags); //DEALLOCATES flags
int countIntLength(int number); //RETURNS LENGTH OF number int countIntLength(int number); //RETURNS LENGTH OF number
#endif #endif

View File

@ -88,8 +88,7 @@ void checkVersion(inputFlags flags)
} }
} }
void void generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
{ {
int numberBuffer; int numberBuffer;
@ -117,8 +116,13 @@ generateTextKeyChain(char key[], int *textKeyChain, int textKeyChainSize)
} }
} }
int void deallocateOutput(outputFlags flags)
countIntLength(int number) {
free(flags.outputText);
free(flags.usedKey);
}
int countIntLength(int number)
{ {
int returning = 1; int returning = 1;
int buffer = 10; int buffer = 10;