Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Brian Smith
nettle
Commits
c9460c81
Commit
c9460c81
authored
Apr 26, 2013
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use size_t for realloc functions.
parent
86fdb2ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
nettle-types.h
nettle-types.h
+1
-1
realloc.c
realloc.c
+2
-2
No files found.
nettle-types.h
View file @
c9460c81
...
...
@@ -40,7 +40,7 @@ typedef void nettle_random_func(void *ctx,
typedef
void
nettle_progress_func
(
void
*
ctx
,
int
c
);
/* Realloc function, used by struct nettle_buffer. */
typedef
void
*
nettle_realloc_func
(
void
*
ctx
,
void
*
p
,
unsigned
length
);
typedef
void
*
nettle_realloc_func
(
void
*
ctx
,
void
*
p
,
size_t
length
);
/* Ciphers */
typedef
void
nettle_set_key_func
(
void
*
ctx
,
...
...
realloc.c
View file @
c9460c81
...
...
@@ -35,7 +35,7 @@
totally free the object, it is allowed to return a valid
pointer. */
void
*
nettle_realloc
(
void
*
ctx
UNUSED
,
void
*
p
,
unsigned
length
)
nettle_realloc
(
void
*
ctx
UNUSED
,
void
*
p
,
size_t
length
)
{
if
(
length
>
0
)
return
realloc
(
p
,
length
);
...
...
@@ -45,7 +45,7 @@ nettle_realloc(void *ctx UNUSED, void *p, unsigned length)
}
void
*
nettle_xrealloc
(
void
*
ctx
UNUSED
,
void
*
p
,
unsigned
length
)
nettle_xrealloc
(
void
*
ctx
UNUSED
,
void
*
p
,
size_t
length
)
{
if
(
length
>
0
)
{
...
...
Write
Preview
Markdown
is supported
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