[glib-networking/mcatanzaro/ci] Fix minor issues identified by scan-build
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/mcatanzaro/ci] Fix minor issues identified by scan-build
- Date: Thu, 9 Jul 2020 00:17:19 +0000 (UTC)
commit 70b446c8341b5bd2e08dd182b71cbfe48022074e
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Wed Jul 8 19:15:13 2020 -0500
Fix minor issues identified by scan-build
tls/base/gtlsconnection-base.c | 3 +--
tls/gnutls/gtlsconnection-gnutls.c | 1 -
tls/gnutls/gtlsdatabase-gnutls.c | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 931e1cf..97ac24f 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -1987,7 +1987,7 @@ g_tls_connection_base_read_message (GTlsConnectionBase *tls,
GError **error)
{
GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
- GTlsConnectionBaseStatus status;
+ GTlsConnectionBaseStatus status = G_TLS_CONNECTION_BASE_OK;
gssize nread;
g_tls_log_debug (tls, "starting to read messages from TLS connection");
@@ -2015,7 +2015,6 @@ g_tls_connection_base_read_message (GTlsConnectionBase *tls,
g_clear_pointer (&priv->app_data_buf, g_byte_array_unref);
else
g_byte_array_remove_range (priv->app_data_buf, 0, count);
- status = G_TLS_CONNECTION_BASE_OK;
}
}
else
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 6a3edf6..1e09957 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -978,7 +978,6 @@ g_tls_connection_gnutls_write_message (GTlsConnectionBase *tls,
char *message;
guint mtu = gnutls_dtls_get_data_mtu (priv->session);
- ret = GNUTLS_E_LARGE_PACKET;
message = g_strdup_printf("%s %s",
ngettext ("Message of size %lu byte is too large for DTLS connection",
"Message of size %lu bytes is too large for DTLS connection",
total_message_size),
diff --git a/tls/gnutls/gtlsdatabase-gnutls.c b/tls/gnutls/gtlsdatabase-gnutls.c
index 7064d15..fd191f2 100644
--- a/tls/gnutls/gtlsdatabase-gnutls.c
+++ b/tls/gnutls/gtlsdatabase-gnutls.c
@@ -170,7 +170,7 @@ initialize_tables (gnutls_x509_trust_list_t trust_list,
GBytes *issuer = NULL;
gint gerr;
- while ((gerr = gnutls_x509_trust_list_iter_get_ca (trust_list, &iter, &cert)) == 0)
+ while (gnutls_x509_trust_list_iter_get_ca (trust_list, &iter, &cert) == 0)
{
gerr = gnutls_x509_crt_get_raw_dn (cert, &dn);
if (gerr < 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]