aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-10-06 10:04:41 +0000
committerChristian Grothoff <christian@grothoff.org>2010-10-06 10:04:41 +0000
commit8f092bda5144daeff7fd1735a1f49d50a7a1d027 (patch)
tree3c1e15f98da39718b81179d1a679e6d0836dcc9f /src
parent7fb21027ff8726fec229ef0a55b84263be0c18d0 (diff)
downloadgnunet-8f092bda5144daeff7fd1735a1f49d50a7a1d027.tar.gz
gnunet-8f092bda5144daeff7fd1735a1f49d50a7a1d027.zip
fix
Diffstat (limited to 'src')
-rw-r--r--src/datacache/plugin_datacache_mysql.c4
-rw-r--r--src/datastore/plugin_datastore_mysql.c4
-rw-r--r--src/dht/gnunet-service-dht.c1
3 files changed, 4 insertions, 5 deletions
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,
479 memset (qbind, 0, sizeof (qbind)); 479 memset (qbind, 0, sizeof (qbind));
480 off = 0; 480 off = 0;
481 ft = 0; 481 ft = 0;
482 while ((pc > 0) && (-1 != (ft = va_arg (ap, enum enum_field_types)))) 482 while ( (pc > 0) && (-1 != (int) (ft = va_arg (ap, enum enum_field_types))) )
483 { 483 {
484 qbind[off].buffer_type = ft; 484 qbind[off].buffer_type = ft;
485 switch (ft) 485 switch (ft)
@@ -510,7 +510,7 @@ init_params (struct Plugin *plugin,
510 pc--; 510 pc--;
511 off++; 511 off++;
512 } 512 }
513 if (!((pc == 0) && (ft != -1) && (va_arg (ap, int) == -1))) 513 if (! ( (pc == 0) && (-1 != (int) ft) && (va_arg (ap, int) == -1)) )
514 { 514 {
515 GNUNET_break (0); 515 GNUNET_break (0);
516 return GNUNET_SYSERR; 516 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,
663 memset (qbind, 0, sizeof (qbind)); 663 memset (qbind, 0, sizeof (qbind));
664 off = 0; 664 off = 0;
665 ft = 0; 665 ft = 0;
666 while ((pc > 0) && (-1 != (ft = va_arg (ap, enum enum_field_types)))) 666 while ((pc > 0) && (-1 != (int) (ft = va_arg (ap, enum enum_field_types))))
667 { 667 {
668 qbind[off].buffer_type = ft; 668 qbind[off].buffer_type = ft;
669 switch (ft) 669 switch (ft)
@@ -694,7 +694,7 @@ init_params (struct Plugin *plugin,
694 pc--; 694 pc--;
695 off++; 695 off++;
696 } 696 }
697 if (!((pc == 0) && (ft != -1) && (va_arg (ap, int) == -1))) 697 if (! ( (pc == 0) && (-1 != (int) ft) && (va_arg (ap, int) == -1) ) )
698 { 698 {
699 GNUNET_break (0); 699 GNUNET_break (0);
700 return GNUNET_SYSERR; 700 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)
3849 put_message.type = htonl(GNUNET_BLOCK_DHT_MALICIOUS_MESSAGE_TYPE); 3849 put_message.type = htonl(GNUNET_BLOCK_DHT_MALICIOUS_MESSAGE_TYPE);
3850 put_message.expiration = GNUNET_TIME_absolute_hton(GNUNET_TIME_absolute_get_forever()); 3850 put_message.expiration = GNUNET_TIME_absolute_hton(GNUNET_TIME_absolute_get_forever());
3851 memset(&message_context, 0, sizeof(struct DHT_MessageContext)); 3851 memset(&message_context, 0, sizeof(struct DHT_MessageContext));
3852 message_context.client = NULL;
3853 random_key = GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, (uint32_t)-1); 3852 random_key = GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_WEAK, (uint32_t)-1);
3854 GNUNET_CRYPTO_hash(&random_key, sizeof(uint32_t), &key); 3853 GNUNET_CRYPTO_hash(&random_key, sizeof(uint32_t), &key);
3855 memcpy(&message_context.key, &key, sizeof(GNUNET_HashCode)); 3854 memcpy(&message_context.key, &key, sizeof(GNUNET_HashCode));