summaryrefslogtreecommitdiff
path: root/idea.c
diff options
context:
space:
mode:
Diffstat (limited to 'idea.c')
-rw-r--r--idea.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/idea.c b/idea.c
index ffa51ac..391dbff 100644
--- a/idea.c
+++ b/idea.c
@@ -62,7 +62,6 @@ static void cipher_idea(uint16_t in[4], uint16_t out[4], IDEAkey Z);
double
DoIDEA(void)
{
- const char* context = "CPU:IDEA";
unsigned char* plain1 = NULL; /* First plaintext buffer */
unsigned char* crypt1 = NULL; /* Encryption buffer */
unsigned char* plain2 = NULL; /* Second plaintext buffer */
@@ -100,25 +99,11 @@ DoIDEA(void)
** Also, fill up plain1 with sample text.
*/
plain1 = malloc(ARRAY_SIZE);
- if (!plain1) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- exit(1);
- }
crypt1 = malloc(ARRAY_SIZE);
- if (!crypt1) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(plain1);
- exit(1);
- }
plain2 = malloc(ARRAY_SIZE);
- if (!plain2) {
- fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context);
- free(plain1);
- free(plain2);
- exit(1);
- }
+
/*
** Note that we build the "plaintext" by simply loading
** the array up with random numbers.