[gnutls-devel] [PATCH 6/6] Removed another reduntant condition in _gnutls_buffer_append_data().

Jaak Ristioja jaak.ristioja at cyber.ee
Tue Dec 16 17:18:39 CET 2014


A presumably non-NULL value is written to dest->data just above this condition.
---
 lib/gnutls_str.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/gnutls_str.c b/lib/gnutls_str.c
index 29eb95e..a00f4f0 100644
--- a/lib/gnutls_str.c
+++ b/lib/gnutls_str.c
@@ -136,7 +136,7 @@ _gnutls_buffer_append_data(gnutls_buffer_st * dest, const void *data,
 		dest->max_length = new_len;
 		dest->data = dest->allocd + unused;
 
-		if (dest->length && dest->data)
+		if (dest->length)
 			memmove(dest->allocd, dest->data, dest->length);
 		dest->data = dest->allocd;
 	}
-- 
2.2.0




More information about the Gnutls-devel mailing list