summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libluh.c10
-rw-r--r--src/libluh.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libluh.c b/src/libluh.c
index b7412b4..2ef11ca 100644
--- a/src/libluh.c
+++ b/src/libluh.c
@@ -4,18 +4,18 @@
#include <string.h>
#include "libluh.h"
-char* readInput (FILE* stdinput, uint64_t size) {
+char* readInput (FILE* inputFile, uint64_t allocSize) {
int64_t character;
uint64_t length = 0;
char* input;
- input = malloc (sizeof (char) * size);
+ input = malloc (sizeof (char) * allocSize);
- while (EOF != (character = fgetc (stdinput))) {
+ while (EOF != (character = fgetc (inputFile))) {
input[length++] = character;
- if (length == size) {
- input = realloc (input, sizeof (char) * (size += 8));
+ if (length == allocSize) {
+ input = realloc (input, sizeof (char) * (allocSize += 8));
}
}
diff --git a/src/libluh.h b/src/libluh.h
index 2e44c01..77a8d52 100644
--- a/src/libluh.h
+++ b/src/libluh.h
@@ -12,7 +12,7 @@ typedef struct opts {
char* output;
} Opts;
-char* readInput (FILE* input, uint64_t size);
+char* readInput (FILE* inputFile, uint64_t allocSize);
char* cryptXor (char* inputStr, FILE* keyFile);
char* fcryptXor (FILE* inputFile, FILE* keyFile);
char* binDump (char* inputStr, char* binChars);