From: Tim Ruehsen Date: Mon, 10 Sep 2012 07:12:19 +0000 (+0200) Subject: Deleted useless allocations. X-Git-Tag: nettle_2.6_release_20130116~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dde1dbd4cddb9e05badde2b51d9e6820ce63e2b1;p=thirdparty%2Fnettle.git Deleted useless allocations. --- diff --git a/ChangeLog b/ChangeLog index cf5aa1c3..0e1fe2d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-09-10 Niels Möller + + * examples/base16enc.c (main): Deleted useless allocations. Patch + from Tim Rühsen. + 2012-09-07 Niels Möller * examples/nettle-benchmark.c (die): Add NORETURN attribute. Patch diff --git a/examples/base16enc.c b/examples/base16enc.c index c3cb58f4..c1a302d1 100644 --- a/examples/base16enc.c +++ b/examples/base16enc.c @@ -48,20 +48,6 @@ int main(int argc UNUSED, char **argv UNUSED) { - /* "buffer" will hold the bytes from disk: */ - uint8_t * buffer = (uint8_t *) malloc (CHUNK_SIZE * sizeof(uint8_t)); - if (buffer == NULL) { - fprintf (stderr, "Cannot allocate read buffer.\n"); - return EXIT_FAILURE; - } - - /* "result" will hold bytes before output: */ - uint8_t * result = (uint8_t *) malloc (ENCODED_SIZE * sizeof(uint8_t)); - if (result == NULL) { - fprintf (stderr, "Cannot allocate write buffer.\n"); - return EXIT_FAILURE; - } - #ifdef WIN32 _setmode(0, O_BINARY); #endif