From 30ecc23f94aff98f1cfde23a82b455693f8aec15 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 2 Nov 2018 23:47:09 +0100 Subject: style fixes --- src/namestore/gnunet-service-namestore.c | 5 ++--- src/namestore/namestore_api_monitor.c | 3 +-- src/namestore/plugin_namestore_sqlite.c | 14 ++++---------- 3 files changed, 7 insertions(+), 15 deletions(-) (limited to 'src/namestore') diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 1b9e01e18..cdd52cc42 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -624,7 +624,6 @@ send_lookup_response (struct NamestoreClient *nc, char *rd_ser; nick = get_nick_record (zone_key); - GNUNET_assert (-1 != GNUNET_GNSRECORD_records_get_size (rd_count, rd)); @@ -925,7 +924,7 @@ continue_store_activity (struct StoreActivity *sa) sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey))) ) { sa->zm_pos = zm->next; /* not interesting to this monitor */ - continue; // -- fails tests, but why not here? + continue; } if (zm->limit == zm->iteration_cnt) { @@ -1771,7 +1770,7 @@ run_zone_iteration_round (struct ZoneIteration *zi, "Returned %llu results, more results available\n", (unsigned long long) limit); return; /* more results later after we get the -#GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT message */ + #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT message */ } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Completed iteration after %llu/%llu results\n", diff --git a/src/namestore/namestore_api_monitor.c b/src/namestore/namestore_api_monitor.c index 457da0b90..b26389718 100644 --- a/src/namestore/namestore_api_monitor.c +++ b/src/namestore/namestore_api_monitor.c @@ -11,7 +11,7 @@ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ @@ -296,7 +296,6 @@ reconnect (struct GNUNET_NAMESTORE_ZoneMonitor *zm) } - /** * Begin monitoring a zone for changes. If @a iterate_first is set, * we Will first call the @a monitor function on all existing records diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c index 2ffc12f92..23af3960d 100644 --- a/src/namestore/plugin_namestore_sqlite.c +++ b/src/namestore/plugin_namestore_sqlite.c @@ -501,16 +501,10 @@ get_records_and_call_iterator (struct Plugin *plugin, GNUNET_SQ_result_spec_end }; - if (NULL == zone_key) - { - ret = GNUNET_SQ_extract_result (stmt, - rsx); - } - else - { - ret = GNUNET_SQ_extract_result (stmt, - rs); - } + ret = GNUNET_SQ_extract_result (stmt, + (NULL == zone_key) + ? rsx + : rs); if ( (GNUNET_OK != ret) || (record_count > 64 * 1024) ) { -- cgit v1.2.3