]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Deleted useless allocations.
authorTim Ruehsen <tim.ruehsen@gmx.de>
Mon, 10 Sep 2012 07:12:19 +0000 (09:12 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 10 Sep 2012 07:12:19 +0000 (09:12 +0200)
ChangeLog
examples/base16enc.c

index cf5aa1c355849232461cff40d0cb6a4bf61ae22d..0e1fe2d94e9c6da79351502e981e6d9a1ebe3a59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-10  Niels Möller  <nisse@lysator.liu.se>
+
+       * examples/base16enc.c (main): Deleted useless allocations. Patch
+       from Tim Rühsen.
+
 2012-09-07  Niels Möller  <nisse@lysator.liu.se>
 
        * examples/nettle-benchmark.c (die): Add NORETURN attribute. Patch
index c3cb58f4c2f37eb889acba9d9093a935910e3cd5..c1a302d1ac8614028dc8b89de302b54d94d8bb00 100644 (file)
@@ -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