From 29315db62ac17e28a6514d24ba150b6928e28085 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 8 Nov 2010 08:31:46 +0000 Subject: [PATCH] minor cleanup --- src/fs/gnunet-service-fs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c index 0e6a0760e..6889fb703 100644 --- a/src/fs/gnunet-service-fs.c +++ b/src/fs/gnunet-service-fs.c @@ -3877,7 +3877,9 @@ bound_priority (uint32_t prio_in, GNUNET_NO); return 0; /* excess resources */ } - ret = -change_host_trust (cp, -prio_in); + if (prio_in > INT32_MAX) + prio_in = INT32_MAX; + ret = - change_host_trust (cp, - (int) prio_in); if (ret > 0) { if (ret > current_priorities + N) @@ -3899,8 +3901,7 @@ bound_priority (uint32_t prio_in, 1, GNUNET_NO); /* undo charge */ - if (ret != 0) - change_host_trust (cp, ret); + change_host_trust (cp, (int) ret); return -1; /* not enough resources */ } else -- 2.25.1