changeset 28789:c76eb1c6f6ac

Fix annoying, but generally useless warning.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 13 Dec 2009 02:36:08 +0000
parents 5152c6cea318
children c0c24f947211
files libpurple/tests/test_cipher.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/tests/test_cipher.c	Sun Dec 13 02:27:48 2009 +0000
+++ b/libpurple/tests/test_cipher.c	Sun Dec 13 02:36:08 2009 +0000
@@ -142,12 +142,13 @@
 	PurpleCipherContext *context = NULL; \
 	gchar cdigest[41]; \
 	gboolean ret = FALSE; \
+	gchar *input = data; \
 	\
 	cipher = purple_ciphers_find_cipher("sha1"); \
 	context = purple_cipher_context_new(cipher, NULL); \
 	\
-	if((data)) { \
-		purple_cipher_context_append(context, (guchar *)(data), strlen((data))); \
+	if (input) { \
+		purple_cipher_context_append(context, (guchar *)input, strlen(input)); \
 	} else { \
 		gint j; \
 		guchar buff[1000]; \
@@ -202,12 +203,13 @@
 	PurpleCipherContext *context = NULL; \
 	gchar cdigest[65]; \
 	gboolean ret = FALSE; \
+	gchar *input = data; \
 	\
 	cipher = purple_ciphers_find_cipher("sha256"); \
 	context = purple_cipher_context_new(cipher, NULL); \
 	\
-	if((data)) { \
-		purple_cipher_context_append(context, (guchar *)(data), strlen((data))); \
+	if (input) { \
+		purple_cipher_context_append(context, (guchar *)input, strlen(input)); \
 	} else { \
 		gint j; \
 		guchar buff[1000]; \