Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
b06b2fcd
Commit
b06b2fcd
authored
Dec 28, 2019
by
Antonin Décimo
Committed by
Juliusz Chroboczek
May 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Constify source argument of fromhex.
parent
9529941b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
util.c
util.c
+3
-3
util.h
util.h
+1
-2
No files found.
util.c
View file @
b06b2fcd
...
...
@@ -197,7 +197,7 @@ parse_thousands(const char *string)
return
-
1
;
}
int
static
int
h2i
(
char
c
)
{
if
(
c
>=
'0'
&&
c
<=
'9'
)
...
...
@@ -211,7 +211,7 @@ h2i(char c)
}
int
fromhex
(
unsigned
char
*
d
est
,
char
*
src
,
int
n
)
fromhex
(
unsigned
char
*
d
st
,
const
char
*
src
,
int
n
)
{
int
i
;
if
(
n
%
2
!=
0
)
...
...
@@ -224,7 +224,7 @@ fromhex(unsigned char *dest, char *src, int n)
b
=
h2i
(
src
[
i
*
2
+
1
]);
if
(
b
<
0
)
return
-
1
;
d
e
st
[
i
]
=
a
*
16
+
b
;
dst
[
i
]
=
a
*
16
+
b
;
}
return
n
/
2
;
}
...
...
util.h
View file @
b06b2fcd
...
...
@@ -79,8 +79,7 @@ void timeval_min(struct timeval *d, const struct timeval *s);
void
timeval_min_sec
(
struct
timeval
*
d
,
time_t
secs
);
int
parse_nat
(
const
char
*
string
)
ATTRIBUTE
((
pure
));
int
parse_thousands
(
const
char
*
string
)
ATTRIBUTE
((
pure
));
int
h2i
(
char
c
);
int
fromhex
(
unsigned
char
*
dest
,
char
*
src
,
int
n
);
int
fromhex
(
unsigned
char
*
dst
,
const
char
*
src
,
int
n
);
void
do_debugf
(
int
level
,
const
char
*
format
,
...)
ATTRIBUTE
((
format
(
printf
,
2
,
3
)))
COLD
;
int
in_prefix
(
const
unsigned
char
*
restrict
address
,
...
...
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