aboutsummaryrefslogtreecommitdiff
path: root/brandt.c
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-09-21 13:50:20 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-09-21 13:50:20 +0200
commitb31da162a85e993e8bb4287db9b5d8bc6ef2e53f (patch)
treefca58833e5fd19b750ad1aa165661f0bc5200d1b /brandt.c
parent658cb968460233a04e77d37558275a894e9d345c (diff)
coding style fixes
Diffstat (limited to 'brandt.c')
-rw-r--r--brandt.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/brandt.c b/brandt.c
index 2e6a5ed..dd66e0c 100644
--- a/brandt.c
+++ b/brandt.c
@@ -77,7 +77,6 @@ BRANDT_bidder_start (struct BRANDT_Auction *auction,
return;
}
- weprintf("broadcasting msg_init %p from bidder %d", buf, i);
auction->bcast (auction->closure, buf, buflen);
gcry_mpi_set_bit (auction->round_progress, auction->i);
free (buf);
@@ -88,8 +87,8 @@ static void
seller_start (void *arg)
{
struct BRANDT_Auction *ad = (struct BRANDT_Auction *)arg;
- enum auction_type atype;
- enum outcome_type outcome;
+ enum auction_type atype;
+ enum outcome_type outcome;
ad->task = NULL;
@@ -302,7 +301,7 @@ report_outcome (struct BRANDT_Auction *ad,
uint16_t reslen = 0;
if (!handler_res[atype][outcome] ||
- !(res = handler_res[atype][outcome] (ad, &reslen)))
+ !(res = handler_res[atype][outcome] (ad, &reslen)))
ad->result (ad->closure, NULL, 0);
else
ad->result (ad->closure, res, reslen);
@@ -341,7 +340,7 @@ advance_round (struct BRANDT_Auction *ad,
{
/* all bidders msg_decrypt received, broadcast combined msg_decrypt */
if (!handler_out[atype][outcome][ad->cur_round] ||
- !(buf = handler_out[atype][outcome][ad->cur_round](ad, &buflen)))
+ !(buf = handler_out[atype][outcome][ad->cur_round](ad, &buflen)))
{
weprintf ("failed to create msg %d buffer as seller",
ad->cur_round);
@@ -371,7 +370,7 @@ advance_round (struct BRANDT_Auction *ad,
/* create next message buffer */
if (!handler_out[atype][outcome][ad->cur_round] ||
- !(buf = handler_out[atype][outcome][ad->cur_round](ad, &buflen)))
+ !(buf = handler_out[atype][outcome][ad->cur_round](ad, &buflen)))
{
weprintf ("failed to create msg %d buffer as bidder", ad->cur_round);
return;
@@ -404,7 +403,6 @@ BRANDT_got_message (struct BRANDT_Auction *auction,
/** \todo: cache out of order messages instead of discarding */
if (ntohl (head->msg_type) != round || ntohl (head->prot_version) != 0)
{
- weprintf ("%d", auction->i);
weprintf ("got unexpected message, ignoring...");
return;
}
@@ -427,7 +425,6 @@ BRANDT_got_message (struct BRANDT_Auction *auction,
return;
}
gcry_mpi_set_bit (auction->round_progress, sender);
- DM(auction->round_progress);
advance_round (auction, atype, outcome);
}