Skip to content
Snippets Groups Projects
Commit dde1dbd4 authored by Tim Ruehsen's avatar Tim Ruehsen Committed by Niels Möller
Browse files

Deleted useless allocations.

parent 74538386
No related branches found
No related tags found
Loading
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> 2012-09-07 Niels Möller <nisse@lysator.liu.se>
* examples/nettle-benchmark.c (die): Add NORETURN attribute. Patch * examples/nettle-benchmark.c (die): Add NORETURN attribute. Patch
......
...@@ -48,20 +48,6 @@ int ...@@ -48,20 +48,6 @@ int
main(int argc UNUSED, char **argv UNUSED) 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 #ifdef WIN32
_setmode(0, O_BINARY); _setmode(0, O_BINARY);
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment