Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
dde1dbd4
Commit
dde1dbd4
authored
Sep 10, 2012
by
Tim Ruehsen
Committed by
Niels Möller
Sep 10, 2012
Browse files
Deleted useless allocations.
parent
74538386
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
dde1dbd4
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
...
...
examples/base16enc.c
View file @
dde1dbd4
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment