Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
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
Service Desk
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
Simon Wilson
KWSys
Commits
8b085635
Commit
8b085635
authored
10 years ago
by
Rolf Eike Beer
Committed by
Brad King
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
MD5: avoid casting back and forth between size_t and int
Change-Id: Ia74f41c2bb0dc7b164c7a2920acdedcfe17a2899
parent
a99a9235
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MD5.c
+7
-2
7 additions, 2 deletions
MD5.c
with
7 additions
and
2 deletions
MD5.c
+
7
−
2
View file @
8b085635
...
...
@@ -478,11 +478,16 @@ void kwsysMD5_Initialize(kwsysMD5* md5)
/*--------------------------------------------------------------------------*/
void
kwsysMD5_Append
(
kwsysMD5
*
md5
,
unsigned
char
const
*
data
,
int
length
)
{
size_t
dlen
;
if
(
length
<
0
)
{
len
gth
=
(
int
)
strlen
((
char
const
*
)
data
);
d
len
=
strlen
((
char
const
*
)
data
);
}
md5_append
(
&
md5
->
md5_state
,
(
md5_byte_t
const
*
)
data
,
(
size_t
)
length
);
else
{
dlen
=
(
size_t
)
length
;
}
md5_append
(
&
md5
->
md5_state
,
(
md5_byte_t
const
*
)
data
,
dlen
);
}
/*--------------------------------------------------------------------------*/
...
...
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