Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
d13b162a
Commit
d13b162a
authored
Aug 02, 2019
by
Raphael Riebl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
per_support: use uintmax_t in uper_get_constrained_whole_number function
parent
84f1fbb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
skeletons/per_support.c
skeletons/per_support.c
+4
-4
skeletons/per_support.h
skeletons/per_support.h
+1
-1
No files found.
skeletons/per_support.c
View file @
d13b162a
...
...
@@ -121,9 +121,9 @@ uper_put_nsnnwn(asn_per_outp_t *po, int n) {
/* X.691-2008/11, #11.5.6 -> #11.3 */
int
uper_get_constrained_whole_number
(
asn_per_data_t
*
pd
,
u
nsigned
long
*
out_value
,
int
nbits
)
{
u
nsigned
long
lhalf
;
/* Lower half of the number*/
long
half
;
int
uper_get_constrained_whole_number
(
asn_per_data_t
*
pd
,
u
intmax_t
*
out_value
,
int
nbits
)
{
u
intmax_t
lhalf
;
/* Lower half of the number*/
intmax_t
half
;
if
(
nbits
<=
31
)
{
half
=
per_get_few_bits
(
pd
,
nbits
);
...
...
@@ -141,7 +141,7 @@ int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *out_val
if
(
uper_get_constrained_whole_number
(
pd
,
&
lhalf
,
nbits
-
31
))
return
-
1
;
*
out_value
=
((
u
nsigned
long
)
half
<<
(
nbits
-
31
))
|
lhalf
;
*
out_value
=
((
u
intmax_t
)
half
<<
(
nbits
-
31
))
|
lhalf
;
return
0
;
}
...
...
skeletons/per_support.h
View file @
d13b162a
...
...
@@ -64,7 +64,7 @@ ssize_t uper_get_nsnnwn(asn_per_data_t *pd);
ssize_t
aper_get_nsnnwn
(
asn_per_data_t
*
pd
,
int
range
);
/* X.691-2008/11, #11.5.6 */
int
uper_get_constrained_whole_number
(
asn_per_data_t
*
pd
,
u
nsigned
long
*
v
,
int
nbits
);
int
uper_get_constrained_whole_number
(
asn_per_data_t
*
pd
,
u
intmax_t
*
v
,
int
nbits
);
/* Temporary compatibility layer. Will get removed. */
...
...
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