Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
59f5a103
Unverified
Commit
59f5a103
authored
Apr 01, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
string_utils: use restrict for lxc_safe_int64_residual()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
90e69d71
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
string_utils.c
src/lxc/string_utils.c
+3
-2
string_utils.h
src/lxc/string_utils.h
+4
-2
No files found.
src/lxc/string_utils.c
View file @
59f5a103
...
@@ -637,8 +637,9 @@ int lxc_safe_uint64(const char *numstr, uint64_t *converted, int base)
...
@@ -637,8 +637,9 @@ int lxc_safe_uint64(const char *numstr, uint64_t *converted, int base)
return
0
;
return
0
;
}
}
int
lxc_safe_int64_residual
(
const
char
*
numstr
,
int64_t
*
converted
,
int
base
,
char
*
residual
,
int
lxc_safe_int64_residual
(
const
char
*
restrict
numstr
,
size_t
residual_len
)
int64_t
*
restrict
converted
,
int
base
,
char
*
restrict
residual
,
size_t
residual_len
)
{
{
char
*
remaining
=
NULL
;
char
*
remaining
=
NULL
;
int64_t
u
;
int64_t
u
;
...
...
src/lxc/string_utils.h
View file @
59f5a103
...
@@ -64,8 +64,10 @@ __hidden extern int lxc_safe_long(const char *numstr, long int *converted);
...
@@ -64,8 +64,10 @@ __hidden extern int lxc_safe_long(const char *numstr, long int *converted);
__hidden
extern
int
lxc_safe_long_long
(
const
char
*
numstr
,
long
long
int
*
converted
);
__hidden
extern
int
lxc_safe_long_long
(
const
char
*
numstr
,
long
long
int
*
converted
);
__hidden
extern
int
lxc_safe_ulong
(
const
char
*
numstr
,
unsigned
long
*
converted
);
__hidden
extern
int
lxc_safe_ulong
(
const
char
*
numstr
,
unsigned
long
*
converted
);
__hidden
extern
int
lxc_safe_uint64
(
const
char
*
numstr
,
uint64_t
*
converted
,
int
base
);
__hidden
extern
int
lxc_safe_uint64
(
const
char
*
numstr
,
uint64_t
*
converted
,
int
base
);
__hidden
extern
int
lxc_safe_int64_residual
(
const
char
*
numstr
,
int64_t
*
converted
,
int
base
,
__hidden
extern
int
lxc_safe_int64_residual
(
const
char
*
restrict
numstr
,
char
*
residual
,
size_t
residual_len
);
int64_t
*
restrict
converted
,
int
base
,
char
*
restrict
residual
,
size_t
residual_len
);
/* Handles B, kb, MB, GB. Detects overflows and reports -ERANGE. */
/* Handles B, kb, MB, GB. Detects overflows and reports -ERANGE. */
__hidden
extern
int
parse_byte_size_string
(
const
char
*
s
,
long
long
int
*
converted
);
__hidden
extern
int
parse_byte_size_string
(
const
char
*
s
,
long
long
int
*
converted
);
...
...
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