Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-AMF
Commits
a636e930
Commit
a636e930
authored
Jun 25, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPPCHECK: fix a few errors
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
30f09822
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
src/nas/ies/ABBA.hpp
src/nas/ies/ABBA.hpp
+1
-1
src/ngap/libngap/constr_CHOICE.c
src/ngap/libngap/constr_CHOICE.c
+3
-1
src/utils/bstr/bstrlib.c
src/utils/bstr/bstrlib.c
+16
-4
No files found.
src/nas/ies/ABBA.hpp
View file @
a636e930
...
...
@@ -47,7 +47,7 @@ class ABBA {
private:
uint8_t
_iei
;
uint8_t
_length
;
uint8_t
_value
[
25
5
];
uint8_t
_value
[
25
6
];
};
}
// namespace nas
...
...
src/ngap/libngap/constr_CHOICE.c
View file @
a636e930
...
...
@@ -1146,7 +1146,7 @@ asn_enc_rval_t CHOICE_encode_aper(
return
elm
->
type
->
op
->
aper_encoder
(
elm
->
type
,
elm
->
encoding_constraints
.
per_constraints
,
memb_ptr
,
po
);
}
else
{
}
else
if
(
ct
)
{
asn_enc_rval_t
rval
;
if
(
specs
->
ext_start
==
-
1
)
ASN__ENCODE_FAILED
;
if
(
aper_put_nsnnwn
(
po
,
ct
->
range_bits
,
present
-
specs
->
ext_start
))
...
...
@@ -1156,6 +1156,8 @@ asn_enc_rval_t CHOICE_encode_aper(
ASN__ENCODE_FAILED
;
rval
.
encoded
=
0
;
ASN__ENCODED_OK
(
rval
);
}
else
{
ASN__ENCODE_FAILED
;
}
}
...
...
src/utils/bstr/bstrlib.c
View file @
a636e930
...
...
@@ -164,7 +164,8 @@ int balloc(bstring b, int olen) {
#if defined(BSTRLIB_TEST_CANARY)
if
(
len
>
b
->
slen
+
1
)
{
memchr
(
b
->
data
+
b
->
slen
+
1
,
'X'
,
len
-
(
b
->
slen
+
1
));
if
((
memchr
(
b
->
data
+
b
->
slen
+
1
,
'X'
,
len
-
(
b
->
slen
+
1
)))
==
NULL
)
return
BSTR_ERR
;
}
#endif
}
...
...
@@ -218,7 +219,8 @@ bstring bfromcstr(const char* str) {
b
=
(
bstring
)
bstr__alloc
(
sizeof
(
struct
tagbstring
));
if
(
NULL
==
b
)
return
NULL
;
b
->
slen
=
(
int
)
j
;
if
(
NULL
==
(
b
->
data
=
(
unsigned
char
*
)
bstr__alloc
(
b
->
mlen
=
i
)))
{
b
->
data
=
(
unsigned
char
*
)
bstr__alloc
(
b
->
mlen
=
i
);
if
(
b
->
data
==
NULL
)
{
bstr__free
(
b
);
return
NULL
;
}
...
...
@@ -1588,7 +1590,8 @@ int binsertblk(
/* Aliasing case */
if
(((
size_t
)((
unsigned
char
*
)
blk
+
len
))
>=
((
size_t
)
b
->
data
)
&&
((
size_t
)
blk
)
<
((
size_t
)(
b
->
data
+
b
->
mlen
)))
{
if
(
NULL
==
(
aux
=
(
unsigned
char
*
)
bstr__alloc
(
len
)))
return
BSTR_ERR
;
aux
=
(
unsigned
char
*
)
bstr__alloc
(
len
);
if
(
aux
==
NULL
)
return
BSTR_ERR
;
bstr__memcpy
(
aux
,
blk
,
len
);
}
...
...
@@ -2133,6 +2136,9 @@ int bsreadlna(bstring r, struct bStream* s, char terminator) {
int
i
,
l
,
ret
,
rlo
;
char
*
b
;
struct
tagbstring
x
;
x
.
mlen
=
0
;
x
.
slen
=
0
;
x
.
data
=
NULL
;
if
(
s
==
NULL
||
s
->
buff
==
NULL
||
r
==
NULL
||
r
->
mlen
<=
0
||
r
->
slen
<
0
||
r
->
mlen
<
r
->
slen
)
...
...
@@ -2201,6 +2207,9 @@ int bsreadlnsa(bstring r, struct bStream* s, const_bstring term) {
unsigned
char
*
b
;
struct
tagbstring
x
;
struct
charField
cf
;
x
.
mlen
=
0
;
x
.
slen
=
0
;
x
.
data
=
NULL
;
if
(
s
==
NULL
||
s
->
buff
==
NULL
||
r
==
NULL
||
term
==
NULL
||
term
->
data
==
NULL
||
r
->
mlen
<=
0
||
r
->
slen
<
0
||
r
->
mlen
<
r
->
slen
)
...
...
@@ -2470,7 +2479,10 @@ bstring bjoinblk(const struct bstrList* bl, const void* blk, int len) {
* NULL is returned, otherwise a bstring with the correct result is returned.
*/
bstring
bjoin
(
const
struct
bstrList
*
bl
,
const_bstring
sep
)
{
if
(
sep
!=
NULL
&&
(
sep
->
slen
<
0
||
sep
->
data
==
NULL
))
return
NULL
;
if
(
sep
==
NULL
)
return
NULL
;
else
if
(
sep
->
slen
<
0
||
sep
->
data
==
NULL
)
return
NULL
;
return
bjoinblk
(
bl
,
sep
->
data
,
sep
->
slen
);
}
...
...
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