Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
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
mirror
ccan
Commits
cf1b26db
Commit
cf1b26db
authored
Oct 04, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt: increase testing coverage on 64 bit platforms
Help the compiler eliminate untestable code.
parent
5b189c74
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ccan/opt/helpers.c
ccan/opt/helpers.c
+4
-2
No files found.
ccan/opt/helpers.c
View file @
cf1b26db
...
...
@@ -258,7 +258,8 @@ static char * set_long_with_suffix(const char *arg, long *l, const long base)
return
err
;
*
l
=
ll
;
if
(
*
l
!=
ll
)
/* Beware truncation, but don't generate untestable code. */
if
(
sizeof
(
*
l
)
!=
sizeof
(
ll
)
&&
*
l
!=
ll
)
return
arg_bad
(
"value '%s' does not fit into a long"
,
arg
);
return
NULL
;
}
...
...
@@ -272,7 +273,8 @@ static char * set_ulong_with_suffix(const char *arg, unsigned long *ul, const lo
if
(
ll
<
0
)
return
arg_bad
(
"'%s' is negative but destination is unsigned"
,
arg
);
*
ul
=
ll
;
if
(
*
ul
!=
ll
)
/* Beware truncation, but don't generate untestable code. */
if
(
sizeof
(
*
ul
)
!=
sizeof
(
ll
)
&&
*
ul
!=
ll
)
return
arg_bad
(
"value '%s' does not fit into an unsigned long"
,
arg
);
return
NULL
;
}
...
...
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