Commit a200883a authored by Alessandro Rubini's avatar Alessandro Rubini

bmc: better types and parameters (trivial)

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 02b6375f
...@@ -236,8 +236,7 @@ extern void pp_update_clock(struct pp_instance *ppi); ...@@ -236,8 +236,7 @@ extern void pp_update_clock(struct pp_instance *ppi);
/* bmc.c */ /* bmc.c */
extern void m1(struct pp_instance *ppi); extern void m1(struct pp_instance *ppi);
extern void s1(struct pp_instance *ppi, MsgHeader *header, MsgAnnounce *ann); extern void s1(struct pp_instance *ppi, MsgHeader *header, MsgAnnounce *ann);
extern UInteger8 bmc(struct pp_instance *ppi, extern int bmc(struct pp_instance *ppi);
struct pp_frgn_master *frgn_master);
/* msg.c */ /* msg.c */
extern void msg_pack_header(struct pp_instance *ppi, void *buf); extern void msg_pack_header(struct pp_instance *ppi, void *buf);
......
...@@ -173,8 +173,8 @@ static int bmc_dataset_cmp(struct pp_instance *ppi, ...@@ -173,8 +173,8 @@ static int bmc_dataset_cmp(struct pp_instance *ppi,
} }
/* State decision algorithm 9.3.3 Fig 26 */ /* State decision algorithm 9.3.3 Fig 26 */
UInteger8 bmc_state_decision(struct pp_instance *ppi, int bmc_state_decision(struct pp_instance *ppi,
MsgHeader *hdr, MsgAnnounce *ann) MsgHeader *hdr, MsgAnnounce *ann)
{ {
int cmpres; int cmpres;
...@@ -227,10 +227,10 @@ UInteger8 bmc_state_decision(struct pp_instance *ppi, ...@@ -227,10 +227,10 @@ UInteger8 bmc_state_decision(struct pp_instance *ppi,
} }
int bmc(struct pp_instance *ppi)
UInteger8 bmc(struct pp_instance *ppi, struct pp_frgn_master *frgn_master)
{ {
Integer16 i, best; struct pp_frgn_master *frgn_master = ppi->frgn_master;
int i, best;
if (!ppi->number_foreign_records) if (!ppi->number_foreign_records)
if (ppi->state == PPS_MASTER) { if (ppi->state == PPS_MASTER) {
......
...@@ -65,7 +65,7 @@ int st_com_check_record_update(struct pp_instance *ppi) ...@@ -65,7 +65,7 @@ int st_com_check_record_update(struct pp_instance *ppi)
if (ppi->record_update) { if (ppi->record_update) {
PP_VPRINTF("event STATE_DECISION_EVENT\n"); PP_VPRINTF("event STATE_DECISION_EVENT\n");
ppi->record_update = FALSE; ppi->record_update = FALSE;
ppi->next_state = bmc(ppi, ppi->frgn_master); ppi->next_state = bmc(ppi);
if (ppi->next_state != ppi->state) if (ppi->next_state != ppi->state)
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment