From: Christian Grothoff Date: Wed, 6 Oct 2010 10:04:41 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~20158 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f092bda5144daeff7fd1735a1f49d50a7a1d027;p=oweals%2Fgnunet.git fix --- diff --git a/src/datacache/plugin_datacache_mysql.c b/src/datacache/plugin_datacache_mysql.c index 267ea9d3d..a85e9f480 100644 --- a/src/datacache/plugin_datacache_mysql.c +++ b/src/datacache/plugin_datacache_mysql.c @@ -479,7 +479,7 @@ init_params (struct Plugin *plugin, memset (qbind, 0, sizeof (qbind)); off = 0; ft = 0; - while ((pc > 0) && (-1 != (ft = va_arg (ap, enum enum_field_types)))) + while ( (pc > 0) && (-1 != (int) (ft = va_arg (ap, enum enum_field_types))) ) { qbind[off].buffer_type = ft; switch (ft) @@ -510,7 +510,7 @@ init_params (struct Plugin *plugin, pc--; off++; } - if (!((pc == 0) && (ft != -1) && (va_arg (ap, int) == -1))) + if (! ( (pc == 0) && (-1 != (int) ft) && (va_arg (ap, int) == -1)) ) { GNUNET_break (0); return GNUNET_SYSERR; diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c index 4e5d8f9b0..150dc665c 100644 --- a/src/datastore/plugin_datastore_mysql.c +++ b/src/datastore/plugin_datastore_mysql.c @@ -663,7 +663,7 @@ init_params (struct Plugin *plugin, memset (qbind, 0, sizeof (qbind)); off = 0; ft = 0; - while ((pc > 0) && (-1 != (ft = va_arg (ap, enum enum_field_types)))) + while ((pc > 0) && (-1 != (int) (ft = va_arg (ap, enum enum_field_types)))) { qbind[off].buffer_type = ft; switch (ft) @@ -694,7 +694,7 @@ init_params (struct Plugin *plugin, pc--; off++; } - if (!((pc == 0) && (ft != -1) && (va_arg (ap, int) == -1))) + if (! ( (pc == 0) && (-1 != (int) ft) && (va_arg (ap, int) == -1) ) ) { GNUNET_break (0); return GNUNET_SYSERR; diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 0ba700f9b..eb12d83a0 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c @@ -3849,7 +3849,6 @@ malicious_put_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) put_message.type = htonl(GNUNET_BLOCK_DHT_MALICIOUS_MESSAGE_TYPE); put_message.expiration = GNUNET_TIME_absolute_hton(GNUNET_TIME_absolute_get_forever()); memset(&message_context, 0, sizeof(struct DHT_MessageContext)); - message_context.client = NULL; random_key = GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, (uint32_t)-1); GNUNET_CRYPTO_hash(&random_key, sizeof(uint32_t), &key); memcpy(&message_context.key, &key, sizeof(GNUNET_HashCode));