Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Wim Lewis
nettle
Commits
c9460c81
Commit
c9460c81
authored
12 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Use size_t for realloc functions.
parent
86fdb2ce
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
nettle-types.h
+1
-1
1 addition, 1 deletion
nettle-types.h
realloc.c
+2
-2
2 additions, 2 deletions
realloc.c
with
3 additions
and
3 deletions
nettle-types.h
+
1
−
1
View file @
c9460c81
...
@@ -40,7 +40,7 @@ typedef void nettle_random_func(void *ctx,
...
@@ -40,7 +40,7 @@ typedef void nettle_random_func(void *ctx,
typedef
void
nettle_progress_func
(
void
*
ctx
,
int
c
);
typedef
void
nettle_progress_func
(
void
*
ctx
,
int
c
);
/* Realloc function, used by struct nettle_buffer. */
/* 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 */
/* Ciphers */
typedef
void
nettle_set_key_func
(
void
*
ctx
,
typedef
void
nettle_set_key_func
(
void
*
ctx
,
...
...
This diff is collapsed.
Click to expand it.
realloc.c
+
2
−
2
View file @
c9460c81
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
totally free the object, it is allowed to return a valid
totally free the object, it is allowed to return a valid
pointer. */
pointer. */
void
*
void
*
nettle_realloc
(
void
*
ctx
UNUSED
,
void
*
p
,
unsigned
length
)
nettle_realloc
(
void
*
ctx
UNUSED
,
void
*
p
,
size_t
length
)
{
{
if
(
length
>
0
)
if
(
length
>
0
)
return
realloc
(
p
,
length
);
return
realloc
(
p
,
length
);
...
@@ -45,7 +45,7 @@ nettle_realloc(void *ctx UNUSED, void *p, unsigned length)
...
@@ -45,7 +45,7 @@ nettle_realloc(void *ctx UNUSED, void *p, unsigned length)
}
}
void
*
void
*
nettle_xrealloc
(
void
*
ctx
UNUSED
,
void
*
p
,
unsigned
length
)
nettle_xrealloc
(
void
*
ctx
UNUSED
,
void
*
p
,
size_t
length
)
{
{
if
(
length
>
0
)
if
(
length
>
0
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment