Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
50
Issues
50
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
02b6375f
Commit
02b6375f
authored
Mar 07, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bmc: use helper variables
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
9f177f4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
bmc.c
proto-standard/bmc.c
+9
-6
No files found.
proto-standard/bmc.c
View file @
02b6375f
...
...
@@ -95,6 +95,7 @@ static int bmc_dataset_cmp(struct pp_instance *ppi,
MsgHeader
*
hdr_a
,
MsgAnnounce
*
ann_a
,
MsgHeader
*
hdr_b
,
MsgAnnounce
*
ann_b
)
{
struct
ClockQuality
*
qa
,
*
qb
;
Octet
*
ppci
;
PP_VPRINTF
(
"BMC: in bmc_dataset_cmp
\n
"
);
...
...
@@ -150,18 +151,20 @@ static int bmc_dataset_cmp(struct pp_instance *ppi,
}
/* GrandMaster are not identical */
qa
=
&
ann_a
->
grandmasterClockQuality
;
qb
=
&
ann_b
->
grandmasterClockQuality
;
if
(
ann_a
->
grandmasterPriority1
!=
ann_b
->
grandmasterPriority1
)
return
ann_a
->
grandmasterPriority1
-
ann_b
->
grandmasterPriority1
;
if
(
ann_a
->
grandmasterClockQuality
.
clockClass
!=
ann_b
->
grandmasterClockQuality
.
clockClass
)
return
ann_a
->
grandmasterClockQuality
.
clockClass
-
ann_b
->
grandmasterClockQuality
.
clockClass
;
if
(
qa
->
clockClass
!=
qb
->
clockClass
)
return
qa
->
clockClass
-
qb
->
clockClass
;
if
(
ann_a
->
grandmasterClockQuality
.
clockAccuracy
!=
ann_b
->
grandmasterClockQuality
.
clockAccuracy
)
return
ann_a
->
grandmasterClockQuality
.
clockAccuracy
-
ann_b
->
grandmasterClockQuality
.
clockAccuracy
;
if
(
qa
->
clockAccuracy
!=
qb
->
clockAccuracy
)
return
qa
->
clockAccuracy
-
qb
->
clockAccuracy
;
if
(
ann_a
->
grandmasterClockQuality
.
offsetScaledLogVariance
!=
ann_b
->
grandmasterClockQuality
.
offsetScaledLogVariance
)
return
ann_a
->
grandmasterClockQuality
.
clockClass
-
ann_b
->
grandmasterClockQuality
.
clockClass
;
if
(
qa
->
offsetScaledLogVariance
!=
qb
->
offsetScaledLogVariance
)
return
qa
->
clockClass
-
qb
->
clockClass
;
if
(
ann_a
->
grandmasterPriority2
!=
ann_b
->
grandmasterPriority2
)
return
ann_a
->
grandmasterPriority2
-
ann_b
->
grandmasterPriority2
;
...
...
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