gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 01/02: -minor optimization


From: gnunet
Subject: [gnunet] 01/02: -minor optimization
Date: Fri, 21 Oct 2022 03:57:08 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 35068004d96e7d6b1d6548a6bcc2592970c5603d
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Oct 21 10:56:44 2022 +0900

    -minor optimization
---
 src/zonemaster/gnunet-service-zonemaster.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/zonemaster/gnunet-service-zonemaster.c 
b/src/zonemaster/gnunet-service-zonemaster.c
index 0413fff32..4cf5e690a 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -911,17 +911,17 @@ initiate_put_from_pipe_trigger (void *cls)
   nf_count = GNUNET_DISK_file_read (np_fh, buf, sizeof (buf));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Read %lld notifications from pipe\n",
               (long long) nf_count);
-  for (int i = 0; i < nf_count; i++)
+  while (true)
   {
     GNUNET_assert (0 == pthread_mutex_lock (&results_lock));
-    job = results_head;
-    if (NULL == job)
+    if (NULL == results_head)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Hmm... no results. Back to sleep.\n");
+                  "No more results. Back to sleep.\n");
       GNUNET_assert (0 == pthread_mutex_unlock (&results_lock));
       return;
     }
+    job = results_head;
     GNUNET_CONTAINER_DLL_remove (results_head, results_tail, job);
     GNUNET_assert (0 == pthread_mutex_unlock (&results_lock));
     GNUNET_GNSRECORD_query_from_private_key (&job->zone,
@@ -956,7 +956,6 @@ initiate_put_from_pipe_trigger (void *cls)
     refresh_block (job->block_priv);
     free_job (job);
   }
-  return;
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]