aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_lc.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-07-18 09:07:36 +0000
committerChristian Grothoff <christian@grothoff.org>2013-07-18 09:07:36 +0000
commit3f5dc2ddcfc59ca54f18a3688fa1f8aa89340ce6 (patch)
tree1dbd1b650320680b0dfae141343d297e6cf0ad2b /src/fs/gnunet-service-fs_lc.c
parent0512be85aab449f2e0fb96e7aca1afa7757c7bd5 (diff)
downloadgnunet-3f5dc2ddcfc59ca54f18a3688fa1f8aa89340ce6.tar.gz
gnunet-3f5dc2ddcfc59ca54f18a3688fa1f8aa89340ce6.zip
-minor code cleanup
Diffstat (limited to 'src/fs/gnunet-service-fs_lc.c')
-rw-r--r--src/fs/gnunet-service-fs_lc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fs/gnunet-service-fs_lc.c b/src/fs/gnunet-service-fs_lc.c
index f90131815..8066b264a 100644
--- a/src/fs/gnunet-service-fs_lc.c
+++ b/src/fs/gnunet-service-fs_lc.c
@@ -170,11 +170,11 @@ GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client)
170 struct GSF_LocalClient *pos; 170 struct GSF_LocalClient *pos;
171 171
172 pos = client_head; 172 pos = client_head;
173 while ((pos != NULL) && (pos->client != client)) 173 while ((NULL != pos) && (pos->client != client))
174 pos = pos->next; 174 pos = pos->next;
175 if (pos != NULL) 175 if (NULL != pos)
176 return pos; 176 return pos;
177 pos = GNUNET_malloc (sizeof (struct GSF_LocalClient)); 177 pos = GNUNET_new (struct GSF_LocalClient);
178 pos->client = client; 178 pos->client = client;
179 GNUNET_CONTAINER_DLL_insert (client_head, client_tail, pos); 179 GNUNET_CONTAINER_DLL_insert (client_head, client_tail, pos);
180 return pos; 180 return pos;
@@ -340,7 +340,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
340 (type == GNUNET_BLOCK_TYPE_ANY)) 340 (type == GNUNET_BLOCK_TYPE_ANY))
341 { 341 {
342 cr = lc->cr_head; 342 cr = lc->cr_head;
343 while (cr != NULL) 343 while (NULL != cr)
344 { 344 {
345 prd = GSF_pending_request_get_data_ (cr->pr); 345 prd = GSF_pending_request_get_data_ (cr->pr);
346 /* only unify with queries that hae not yet started local processing 346 /* only unify with queries that hae not yet started local processing
@@ -368,7 +368,7 @@ GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
368 GNUNET_STATISTICS_update (GSF_stats, 368 GNUNET_STATISTICS_update (GSF_stats,
369 gettext_noop ("# client searches active"), 1, 369 gettext_noop ("# client searches active"), 1,
370 GNUNET_NO); 370 GNUNET_NO);
371 cr = GNUNET_malloc (sizeof (struct ClientRequest)); 371 cr = GNUNET_new (struct ClientRequest);
372 cr->lc = lc; 372 cr->lc = lc;
373 GNUNET_CONTAINER_DLL_insert (lc->cr_head, lc->cr_tail, cr); 373 GNUNET_CONTAINER_DLL_insert (lc->cr_head, lc->cr_tail, cr);
374 options = GSF_PRO_LOCAL_REQUEST; 374 options = GSF_PRO_LOCAL_REQUEST;
@@ -498,7 +498,7 @@ GSF_client_disconnect_handler_ (void *cls, struct GNUNET_SERVER_Client *client)
498 GNUNET_CONTAINER_DLL_remove (pos->res_head, pos->res_tail, res); 498 GNUNET_CONTAINER_DLL_remove (pos->res_head, pos->res_tail, res);
499 GNUNET_free (res); 499 GNUNET_free (res);
500 } 500 }
501 if (pos->th != NULL) 501 if (NULL != pos->th)
502 { 502 {
503 GNUNET_SERVER_notify_transmit_ready_cancel (pos->th); 503 GNUNET_SERVER_notify_transmit_ready_cancel (pos->th);
504 pos->th = NULL; 504 pos->th = NULL;