From: Matthias Wachs Date: Wed, 1 Sep 2010 11:06:50 +0000 (+0000) Subject: fixed bugs found by Klocwork X-Git-Tag: initial-import-from-subversion-38251~20493 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=18e38359e46e7b368276d06411766a1a54026340;p=oweals%2Fgnunet.git fixed bugs found by Klocwork --- diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c index 204dac7bf..67884e5ea 100644 --- a/src/transport/test_transport_api_reliability.c +++ b/src/transport/test_transport_api_reliability.c @@ -386,8 +386,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) if (GNUNET_CONFIGURATION_have_value (p->cfg, "transport-https", "KEY_FILE")) GNUNET_CONFIGURATION_get_value_string (p->cfg, "transport-https", "KEY_FILE", &key_file_p1); - else - GNUNET_asprintf(&key_file_p1,"https.key"); + if (key_file_p1 == NULL) + GNUNET_asprintf(&key_file_p1,"https_p1.key"); if (0 == stat (key_file_p1, &sbuf )) { if (0 == remove(key_file_p1)) @@ -397,8 +397,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) } if (GNUNET_CONFIGURATION_have_value (p->cfg,"transport-https", "CERT_FILE")) GNUNET_CONFIGURATION_get_value_string (p->cfg, "transport-https", "CERT_FILE", &cert_file_p1); - else - GNUNET_asprintf(&cert_file_p1,"https.cert"); + if (cert_file_p1 == NULL) + GNUNET_asprintf(&cert_file_p1,"https_p1.cert"); if (0 == stat (cert_file_p1, &sbuf )) { if (0 == remove(cert_file_p1)) @@ -412,8 +412,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) if (GNUNET_CONFIGURATION_have_value (p->cfg, "transport-https", "KEY_FILE")) GNUNET_CONFIGURATION_get_value_string (p->cfg, "transport-https", "KEY_FILE", &key_file_p2); - else - GNUNET_asprintf(&key_file_p2,"https.key"); + if (key_file_p2 == NULL) + GNUNET_asprintf(&key_file_p2,"https_p2.key"); if (0 == stat (key_file_p2, &sbuf )) { if (0 == remove(key_file_p2)) @@ -423,8 +423,8 @@ setup_peer (struct PeerContext *p, const char *cfgname) } if (GNUNET_CONFIGURATION_have_value (p->cfg,"transport-https", "CERT_FILE")) GNUNET_CONFIGURATION_get_value_string (p->cfg, "transport-https", "CERT_FILE", &cert_file_p2); - else - GNUNET_asprintf(&cert_file_p2,"https.cert"); + if (cert_file_p2 == NULL) + GNUNET_asprintf(&cert_file_p2,"https_p2.cert"); if (0 == stat (cert_file_p2, &sbuf )) { if (0 == remove(cert_file_p2))