diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-23 14:02:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-23 14:02:52 +0000 |
commit | d2efe262a0dda14e37d3787e8c52dae4ae6a8bab (patch) | |
tree | 1abf4b3d372611cc0cd4507a7c27f513e9a57345 /src/core/gnunet-service-core_typemap.c | |
parent | b0f5a7b53015ad3de87da115c940ba92f6143116 (diff) | |
download | gnunet-d2efe262a0dda14e37d3787e8c52dae4ae6a8bab.tar.gz gnunet-d2efe262a0dda14e37d3787e8c52dae4ae6a8bab.zip |
simplify logic
Diffstat (limited to 'src/core/gnunet-service-core_typemap.c')
-rw-r--r-- | src/core/gnunet-service-core_typemap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/gnunet-service-core_typemap.c b/src/core/gnunet-service-core_typemap.c index 5d40820df..c54e446c6 100644 --- a/src/core/gnunet-service-core_typemap.c +++ b/src/core/gnunet-service-core_typemap.c | |||
@@ -227,6 +227,8 @@ GSC_TYPEMAP_test_match (const struct GSC_TypeMap *tmap, | |||
227 | 227 | ||
228 | if (NULL == tmap) | 228 | if (NULL == tmap) |
229 | return GNUNET_NO; | 229 | return GNUNET_NO; |
230 | if (0 == tcnt) | ||
231 | return GNUNET_YES; /* matches all */ | ||
230 | for (i=0;i<tcnt;i++) | 232 | for (i=0;i<tcnt;i++) |
231 | if (0 != (tmap->bits[types[i] / 32] & (1 << (types[i] % 32)))) | 233 | if (0 != (tmap->bits[types[i] / 32] & (1 << (types[i] % 32)))) |
232 | return GNUNET_YES; | 234 | return GNUNET_YES; |