diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-19 09:25:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-19 09:25:11 +0000 |
commit | c0023ffa9d33f7e0acaa4ab25da1bdc91e5b7d0a (patch) | |
tree | e0a69469b8877044dc3e9083c87c028196e8ee95 /src/namestore/namestore_api.c | |
parent | 16fadba6f7aab3d42623650133cd95536e825dbc (diff) | |
download | gnunet-c0023ffa9d33f7e0acaa4ab25da1bdc91e5b7d0a.tar.gz gnunet-c0023ffa9d33f7e0acaa4ab25da1bdc91e5b7d0a.zip |
-minor cleanup
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r-- | src/namestore/namestore_api.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 151fb9752..e216ad767 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -265,30 +265,30 @@ handle_lookup_name_response (struct GNUNET_NAMESTORE_QueueEntry *qe, | |||
265 | rd_tmp = &name[name_len]; | 265 | rd_tmp = &name[name_len]; |
266 | 266 | ||
267 | /* deserialize records */ | 267 | /* deserialize records */ |
268 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; | ||
269 | if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize(rd_len, rd_tmp, rd_count, rd)) | ||
270 | { | 268 | { |
271 | GNUNET_break_op (0); | 269 | struct GNUNET_NAMESTORE_RecordData rd[rd_count]; |
272 | return; | 270 | if (GNUNET_OK != GNUNET_NAMESTORE_records_deserialize(rd_len, rd_tmp, rd_count, rd)) |
273 | } | 271 | { |
274 | 272 | GNUNET_break_op (0); | |
273 | return; | ||
274 | } | ||
275 | 275 | ||
276 | /* reset values if values not contained */ | ||
277 | if (contains_sig == GNUNET_NO) | ||
278 | signature = NULL; | ||
279 | else | ||
280 | signature = &msg->signature; | ||
281 | if (name_len == 0) | ||
282 | name = NULL; | ||
283 | 276 | ||
284 | if (name != NULL) | 277 | /* reset values if values not contained */ |
278 | if (GNUNET_NO == contains_sig) | ||
279 | signature = NULL; | ||
280 | else | ||
281 | signature = &msg->signature; | ||
282 | if (0 == name_len) | ||
283 | name = NULL; | ||
284 | |||
285 | if (NULL != name) | ||
285 | public_key_tmp = &msg->public_key; | 286 | public_key_tmp = &msg->public_key; |
286 | else | 287 | else |
287 | public_key_tmp = NULL; | 288 | public_key_tmp = NULL; |
288 | 289 | ||
289 | if (qe->proc != NULL) | 290 | if (NULL != qe->proc) |
290 | { | 291 | qe->proc (qe->proc_cls, public_key_tmp, expire, name, rd_count, (rd_count > 0) ? rd : NULL, signature); |
291 | qe->proc (qe->proc_cls, public_key_tmp, expire, name, rd_count, (rd_count > 0) ? rd : NULL, signature); | ||
292 | } | 292 | } |
293 | GNUNET_free (qe); | 293 | GNUNET_free (qe); |
294 | } | 294 | } |