diff common-algo.c @ 1123:d7b752525b91

buf_getstring and buf_putstring now use non-unsigned char*
author Matt Johnston <matt@ucc.asn.au>
date Thu, 04 Jun 2015 23:08:50 +0800
parents bb3a03feb31f
children 6aeadee3f16b
line wrap: on
line diff
--- a/common-algo.c	Thu Jun 04 22:25:28 2015 +0800
+++ b/common-algo.c	Thu Jun 04 23:08:50 2015 +0800
@@ -328,7 +328,7 @@
 			buf_putbytes(algolist, (const unsigned char *) localalgos[i].name, len);
 		}
 	}
-	buf_putstring(buf, algolist->data, algolist->len);
+	buf_putstring(buf, (const char*)algolist->data, algolist->len);
 	buf_free(algolist);
 }
 
@@ -353,7 +353,7 @@
 	}
 
 	/* get the comma-separated list from the buffer ie "algo1,algo2,algo3" */
-	algolist = (char *) buf_getstring(buf, &len);
+	algolist = buf_getstring(buf, &len);
 	TRACE(("buf_match_algo: %s", algolist))
 	if (len > MAX_PROPOSED_ALGO*(MAX_NAME_LEN+1)) {
 		goto out;