summaryrefslogtreecommitdiffhomepage
path: root/common-algo.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-06-04 23:08:50 +0800
commitd96a52541f0f89836e99fea2d1bb8e3f4a1f4144 (patch)
tree4eedfa1c5b7e94fb6d930e2528c4d3eb6c27a7c2 /common-algo.c
parentecd850521816dc2a78792fc53dd9c6c80d5d1b91 (diff)
parent9fdab3ced8374b991bfadce0056cf5bdf7cfb3d6 (diff)
Merge pull request #13 from gazoo74/fix-warnings
Fix warnings
Diffstat (limited to 'common-algo.c')
-rw-r--r--common-algo.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/common-algo.c b/common-algo.c
index b1d4966..002ae66 100644
--- a/common-algo.c
+++ b/common-algo.c
@@ -325,10 +325,10 @@ void buf_put_algolist(buffer * buf, algo_type localalgos[]) {
buf_putbyte(algolist, ',');
donefirst = 1;
len = strlen(localalgos[i].name);
- buf_putbytes(algolist, localalgos[i].name, len);
+ 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);
}
@@ -341,12 +341,12 @@ 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;
@@ -491,7 +491,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;
}