summaryrefslogtreecommitdiffhomepage
path: root/common-algo.c
diff options
context:
space:
mode:
authorGaël PORTAY <gael.portay@gmail.com>2015-05-02 15:59:06 +0200
committerGaël PORTAY <gael.portay@gmail.com>2015-05-05 20:39:13 +0200
commit224b16b2470ab764e854eb4a7cdd568353655afc (patch)
treeeba9e3ed33fd1c66c6286abaf3f3e383f2eb8504 /common-algo.c
parentef0aac432c986f52a1b973bcd73ddf7324e0e70f (diff)
Fix pointer differ in signess warnings [-Werror=pointer-sign]
Diffstat (limited to 'common-algo.c')
-rw-r--r--common-algo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common-algo.c b/common-algo.c
index a3e9d78..0886a2b 100644
--- a/common-algo.c
+++ b/common-algo.c
@@ -338,19 +338,19 @@ algo_type * buf_match_algo(buffer* buf, algo_type localalgos[],
enum kexguess2_used *kexguess2, int *goodguess)
{
- unsigned char * algolist = NULL;
- const unsigned char *remotenames[MAX_PROPOSED_ALGO], *localnames[MAX_PROPOSED_ALGO];
+ char * algolist = NULL;
+ const char *remotenames[MAX_PROPOSED_ALGO], *localnames[MAX_PROPOSED_ALGO];
unsigned int len;
unsigned int remotecount, localcount, clicount, servcount, i, j;
algo_type * ret = NULL;
- const unsigned char **clinames, **servnames;
+ const char **clinames, **servnames;
if (goodguess) {
*goodguess = 0;
}
/* get the comma-separated list from the buffer ie "algo1,algo2,algo3" */
- algolist = buf_getstring(buf, &len);
+ algolist = (char *) buf_getstring(buf, &len);
TRACE(("buf_match_algo: %s", algolist))
if (len > MAX_PROPOSED_ALGO*(MAX_NAME_LEN+1)) {
goto out;
@@ -488,7 +488,7 @@ algolist_string(algo_type algos[])
buf_setpos(b, b->len);
buf_putbyte(b, '\0');
buf_setpos(b, 4);
- ret_list = m_strdup(buf_getptr(b, b->len - b->pos));
+ ret_list = m_strdup((const char *) buf_getptr(b, b->len - b->pos));
buf_free(b);
return ret_list;
}