changed decrypLogger type to decryptedOutput

cuz length
This commit is contained in:
Václav Šmejkal 2023-01-25 13:50:47 +01:00
parent 6e3e05aa0b
commit e7282dec5a
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59
2 changed files with 7 additions and 3 deletions

View File

@ -23,6 +23,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
void deallocateLogger(logFile logger); //USE THIS IF YOU WANT TO DEALLOCATE FILE POINTER RETURNED BY logger'S initLogger void deallocateLogger(logFile logger); //USE THIS IF YOU WANT TO DEALLOCATE FILE POINTER RETURNED BY logger'S initLogger
void deallocateDoublePointer(char **string); //DEALLOCATION OF POINTER-TO-POINTER, WHY TF ARE YOU READING THIS void deallocateDoublePointer(char **string); //DEALLOCATION OF POINTER-TO-POINTER, WHY TF ARE YOU READING THIS
char **decryptLogger(logFile logger); //PASS logger AND FLAGS, AND PROGRAM WILL DECRYPT YOUR LOG... WHAT DID YOU EXPECT? decryptedOutput decryptLogger(logFile logger); //PASS logger AND FLAGS, AND PROGRAM WILL DECRYPT YOUR LOG... WHAT DID YOU EXPECT?
#endif #endif

View File

@ -52,7 +52,7 @@ void deallocateDoublePointer(char **string)
free(string); //no free(string); //no
} }
char **decryptLogger(logFile logger) //TODO: Fix valgrind issues decryptedOutput decryptLogger(logFile logger) //TODO: Fix valgrind issues
{ {
FILE *file = fdopen(logger.file, "r"); FILE *file = fdopen(logger.file, "r");
outputFlags outputBuffer; outputFlags outputBuffer;
@ -114,5 +114,9 @@ char **decryptLogger(logFile logger) //TODO: Fix valgrind issues
fclose(file); fclose(file);
deallocateDoublePointer(content); deallocateDoublePointer(content);
return contentDecrypted; return (decryptedOutput)
{
contentDecrypted,
lines
};
} }