Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
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
UERANSIM
Commits
5ace587f
Commit
5ace587f
authored
Dec 03, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for 32-bit architectures
parent
9d3f49f3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
7 deletions
+2
-7
src/lib/asn/utils.hpp
src/lib/asn/utils.hpp
+2
-2
src/utils/bits.hpp
src/utils/bits.hpp
+0
-5
No files found.
src/lib/asn/utils.hpp
View file @
5ace587f
...
...
@@ -88,7 +88,7 @@ inline void SetBitStringInt(int value, BIT_STRING_t &target)
if
(
target
.
buf
!=
nullptr
)
free
(
target
.
buf
);
target
.
size
=
bits
::
NearDiv
(
BitCount
,
8
)
/
8
;
target
.
size
=
bits
::
NearDiv
(
static_cast
<
int
>
(
BitCount
)
,
8
)
/
8
;
target
.
buf
=
static_cast
<
uint8_t
*>
(
calloc
(
1
,
target
.
size
));
target
.
bits_unused
=
(
8
-
(
static_cast
<
int
>
(
BitCount
)
%
8
))
%
8
;
BitBuffer
{
target
.
buf
}.
writeBits
(
value
,
BitCount
);
...
...
@@ -101,7 +101,7 @@ inline void SetBitStringLong(int64_t value, BIT_STRING_t &target)
if
(
target
.
buf
!=
nullptr
)
free
(
target
.
buf
);
target
.
size
=
bits
::
NearDiv
(
BitCount
,
8
)
/
8
;
target
.
size
=
bits
::
NearDiv
(
static_cast
<
int
>
(
BitCount
)
,
8
)
/
8
;
target
.
buf
=
static_cast
<
uint8_t
*>
(
calloc
(
1
,
target
.
size
));
target
.
bits_unused
=
(
8
-
(
static_cast
<
int
>
(
BitCount
)
%
8
))
%
8
;
BitBuffer
{
target
.
buf
}.
writeBits
(
value
,
BitCount
);
...
...
src/utils/bits.hpp
View file @
5ace587f
...
...
@@ -112,11 +112,6 @@ inline uint8_t Consequential8(bool b7, bool b6, bool b5, bool b4, bool b3, bool
return
Ranged8
({{
1
,
b7
},
{
1
,
b6
},
{
1
,
b5
},
{
1
,
b4
},
{
1
,
b3
},
{
1
,
b2
},
{
1
,
b1
},
{
1
,
b0
}});
}
inline
unsigned
NearDiv
(
unsigned
val
,
unsigned
div
)
{
return
(
div
)
*
((
val
+
(
div
-
1u
))
/
(
div
));
}
inline
int
NearDiv
(
int
val
,
int
div
)
{
return
(
div
)
*
((
val
+
(
div
-
1
))
/
(
div
));
...
...
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