Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
map-agent
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Multi-AP
map-agent
Commits
865609b5
Commit
865609b5
authored
1 year ago
by
Maxim Menshikov
Browse files
Options
Downloads
Patches
Plain Diff
Fix indentation
parent
39e80d19
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#115153
failed
1 year ago
Stage: static_code_analysis
Stage: compile_test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/qos.c
+12
-12
12 additions, 12 deletions
src/qos.c
with
12 additions
and
12 deletions
src/qos.c
+
12
−
12
View file @
865609b5
...
...
@@ -139,12 +139,12 @@ dscp_pcp_conv_result dscp_pcp2qosmap(uint8_t dscp_pcp[64],
dscp_pcp_conv_result
rc
=
DSCP_PCP_CONV_RESULT_OK
;
/* pcp -> dscp usage table */
/* pcp -> dscp usage table */
uint8_t
pcp_dscp
[
PCP_COUNT
][
DSCP_PCP_MAX
];
/* Minimal and maximal DSCPs for PCP */
/* Minimal and maximal DSCPs for PCP */
uint8_t
pcp_dscp_min
[
PCP_COUNT
]
=
{
DSCP_NEUTRAL
};
uint8_t
pcp_dscp_max
[
PCP_COUNT
]
=
{
DSCP_NEUTRAL
};
/* DSCP exceptions */
/* DSCP exceptions */
uint8_t
dscp_up
[
DSCP_UP_EXC_MAX
][
2
];
size_t
total_du
=
0
;
size_t
i
,
j
;
...
...
@@ -152,7 +152,7 @@ dscp_pcp_conv_result dscp_pcp2qosmap(uint8_t dscp_pcp[64],
memset
(
pcp_dscp
,
0
,
sizeof
(
pcp_dscp
));
/* Convert DSCP->PCP to PCP->DSCP usage table */
/* Convert DSCP->PCP to PCP->DSCP usage table */
for
(
i
=
0
;
i
<
DSCP_PCP_MAX
;
++
i
)
{
uint8_t
pcp
=
dscp_pcp
[
i
];
uint8_t
dscp
=
i
;
...
...
@@ -250,18 +250,18 @@ dscp_pcp_conv_result dscp_pcp2qosmap(uint8_t dscp_pcp[64],
rc
!=
DSCP_PCP_CONV_RESULT_OK_TOO_MANY_EXC
)
return
rc
;
/* Write out PCP_x_DSCP_min, PCP_x_DSCP_max */
/* Write out PCP_x_DSCP_min, PCP_x_DSCP_max */
for
(
i
=
0
;
i
<
PCP_COUNT
;
++
i
)
{
char
pair
[
TMP_BUF_LEN
];
/*
* No need for bounds check - result length can't exceed the buffer
* length
*/
/*
* No need for bounds check - result length can't exceed the buffer
* length
*/
sprintf
(
pair
,
"%s%d,%d"
,
(
i
!=
0
||
total_du
!=
0
)
?
","
:
""
,
pcp_dscp_min
[
i
],
pcp_dscp_max
[
i
]);
(
i
!=
0
||
total_du
!=
0
)
?
","
:
""
,
pcp_dscp_min
[
i
],
pcp_dscp_max
[
i
]);
final_len
+=
strlen
(
pair
);
if
(
final_len
>
qos_map_len
)
{
rc
=
DSCP_PCP_CONV_RESULT_TOO_LONG
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment