[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35744 - gnunet/src/rps
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35744 - gnunet/src/rps |
Date: |
Wed, 20 May 2015 00:41:12 +0200 |
Author: ch3
Date: 2015-05-20 00:41:12 +0200 (Wed, 20 May 2015)
New Revision: 35744
Modified:
gnunet/src/rps/gnunet-service-rps.c
Log:
-replaced own util fkt with GNUNET_ one
Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-05-19 22:41:09 UTC (rev 35743)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-05-19 22:41:12 UTC (rev 35744)
@@ -486,11 +486,6 @@
#define unset_peer_flag(peer_ctx, mask) (peer_ctx->peer_flags &= (~mask))
/**
- * Compute the minimum of two ints
- */
-#define min(x, y) ((x < y) ? x : y)
-
-/**
* Clean the send channel of a peer
*/
void
@@ -1865,9 +1860,9 @@
{ /* Try to maximise representation */
/* The maximum of pushes we're going to send this round */
- num_pushes = min (min (push_limit,
- num_attacked_peers),
- GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE);
+ num_pushes = GNUNET_MIN (GNUNET_MIN (push_limit,
+ num_attacked_peers),
+ GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE);
/* Send PUSHes to attacked peers */
for (i = 0 ; i < num_pushes ; i++)
@@ -1907,9 +1902,9 @@
{ /* Combined attack */
/* The maximum of pushes we're going to send this round */
- num_pushes = min (min (push_limit,
- num_attacked_peers),
- GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE) - 1;
+ num_pushes = GNUNET_MIN (GNUNET_MIN (push_limit - 1,
+ num_attacked_peers),
+ GNUNET_CONSTANTS_MAX_CADET_MESSAGE_SIZE);
/* Send PUSHes to attacked peers */
send_push (&attacked_peer);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35744 - gnunet/src/rps,
gnunet <=