diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-11-30 20:22:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-11-30 20:22:15 +0000 |
commit | 3f1b003aafd4426576369f229ca6740a77cd7504 (patch) | |
tree | b3579ebbcf676c2069f851c7237e817a337f9aef /src/scalarproduct/scalarproduct_api.c | |
parent | 8e013a4a1792ec10f213d7d0c1b7e5442b9559cf (diff) | |
download | gnunet-3f1b003aafd4426576369f229ca6740a77cd7504.tar.gz gnunet-3f1b003aafd4426576369f229ca6740a77cd7504.zip |
-indentation fixes, some fixes to message size checks, some code cleanup
Diffstat (limited to 'src/scalarproduct/scalarproduct_api.c')
-rw-r--r-- | src/scalarproduct/scalarproduct_api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scalarproduct/scalarproduct_api.c b/src/scalarproduct/scalarproduct_api.c index 26c69dd13..6672e0e8f 100644 --- a/src/scalarproduct/scalarproduct_api.c +++ b/src/scalarproduct/scalarproduct_api.c | |||
@@ -149,7 +149,7 @@ process_result_message (struct GNUNET_SCALARPRODUCT_ComputationHandle *h, | |||
149 | const struct ClientResponseMessage *msg, | 149 | const struct ClientResponseMessage *msg, |
150 | enum GNUNET_SCALARPRODUCT_ResponseStatus status) | 150 | enum GNUNET_SCALARPRODUCT_ResponseStatus status) |
151 | { | 151 | { |
152 | size_t product_len = ntohl (msg->product_length); | 152 | size_t product_len; |
153 | gcry_mpi_t result = NULL; | 153 | gcry_mpi_t result = NULL; |
154 | gcry_error_t rc; | 154 | gcry_error_t rc; |
155 | gcry_mpi_t num; | 155 | gcry_mpi_t num; |
@@ -158,7 +158,7 @@ process_result_message (struct GNUNET_SCALARPRODUCT_ComputationHandle *h, | |||
158 | if ( (GNUNET_SCALARPRODUCT_Status_Success == status) && | 158 | if ( (GNUNET_SCALARPRODUCT_Status_Success == status) && |
159 | ( (NULL == msg) || | 159 | ( (NULL == msg) || |
160 | ( (ntohs (msg->header.size) - sizeof (struct ClientResponseMessage) | 160 | ( (ntohs (msg->header.size) - sizeof (struct ClientResponseMessage) |
161 | != product_len) ) ) ) | 161 | != (product_len = ntohl (msg->product_length))) ) ) ) |
162 | { | 162 | { |
163 | GNUNET_break (0); | 163 | GNUNET_break (0); |
164 | status = GNUNET_SCALARPRODUCT_Status_InvalidResponse; | 164 | status = GNUNET_SCALARPRODUCT_Status_InvalidResponse; |