Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
spbro
OpenXG-RAN
Commits
463dfc66
Commit
463dfc66
authored
Nov 22, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid bitshifts on signed integers
parent
11c853e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
openair3/UTILS/conversions.h
openair3/UTILS/conversions.h
+8
-8
No files found.
openair3/UTILS/conversions.h
View file @
463dfc66
...
...
@@ -110,10 +110,10 @@ do { \
/* Convert an array of char containing vALUE to x */
#define BUFFER_TO_INT32(buf, x) \
do { \
x = ((
buf)[0]
<< 24) | \
((
buf)[1]
<< 16) | \
((
buf)[2]
<< 8) | \
((
buf)[3]
); \
x = ((
(uint32_t)(buf)[0])
<< 24) | \
((
(uint32_t)(buf)[1])
<< 16) | \
((
(uint32_t)(buf)[2])
<< 8) | \
((
(uint32_t)(buf)[3])
); \
} while(0)
/* Convert an array of char containing vALUE to x */
...
...
@@ -427,10 +427,10 @@ do { \
do { \
DevCheck((bITsTRING)->size == 4, (bITsTRING)->size, 4, 0); \
DevCheck((bITsTRING)->bits_unused == 0, (bITsTRING)->bits_unused, 0, 0); \
mACRO = ((
bITsTRING)->buf[3]
<< 24) + \
((
bITsTRING)->buf[2]
<< 16) + \
((
bITsTRING)->buf[1]
<< 8) + \
((
bITsTRING)->buf[0]
); \
mACRO = ((
(uint32_t) (bITsTRING)->buf[3])
<< 24) + \
((
(uint32_t) (bITsTRING)->buf[2])
<< 16) + \
((
(uint32_t) (bITsTRING)->buf[1])
<< 8) + \
((
(uint32_t) (bITsTRING)->buf[0])
); \
} while (0)
...
...
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