gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17687 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r17687 - gnunet/src/core
Date: Sun, 23 Oct 2011 16:02:52 +0200

Author: grothoff
Date: 2011-10-23 16:02:52 +0200 (Sun, 23 Oct 2011)
New Revision: 17687

Modified:
   gnunet/src/core/gnunet-service-core_clients.c
   gnunet/src/core/gnunet-service-core_typemap.c
Log:
simplify logic

Modified: gnunet/src/core/gnunet-service-core_clients.c
===================================================================
--- gnunet/src/core/gnunet-service-core_clients.c       2011-10-23 13:51:43 UTC 
(rev 17686)
+++ gnunet/src/core/gnunet-service-core_clients.c       2011-10-23 14:02:52 UTC 
(rev 17687)
@@ -668,14 +668,6 @@
 
   old_match = GSC_TYPEMAP_test_match (tmap_old, client->types, client->tcnt);
   new_match = GSC_TYPEMAP_test_match (tmap_new, client->types, client->tcnt);
-  if (client->tcnt == 0)
-  {
-    /* empty list matches ALL (if not NULL) */
-    if (tmap_new != NULL)
-      new_match = GNUNET_YES; 
-    if (tmap_old != NULL)
-      old_match = GNUNET_YES;
-  }
   if (old_match == new_match)
     return; /* no change */
   if (old_match == GNUNET_NO)

Modified: gnunet/src/core/gnunet-service-core_typemap.c
===================================================================
--- gnunet/src/core/gnunet-service-core_typemap.c       2011-10-23 13:51:43 UTC 
(rev 17686)
+++ gnunet/src/core/gnunet-service-core_typemap.c       2011-10-23 14:02:52 UTC 
(rev 17687)
@@ -227,6 +227,8 @@
 
   if (NULL == tmap)
     return GNUNET_NO;
+  if (0 == tcnt)
+    return GNUNET_YES; /* matches all */
   for (i=0;i<tcnt;i++) 
     if (0 != (tmap->bits[types[i] / 32] & (1 << (types[i] % 32))))
       return GNUNET_YES;




reply via email to

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