Turn Algo_Type's name attribute into const char *

This commit is contained in:
Gaël PORTAY 2015-05-02 22:37:08 +02:00
parent bd6c37adb6
commit 6b90885d4f
2 changed files with 2 additions and 2 deletions

2
algo.h
View File

@ -35,7 +35,7 @@
struct Algo_Type { struct Algo_Type {
const unsigned char *name; /* identifying name */ const char *name; /* identifying name */
char val; /* a value for this cipher, or -1 for invalid */ char val; /* a value for this cipher, or -1 for invalid */
const void *data; /* algorithm specific data */ const void *data; /* algorithm specific data */
char usable; /* whether we can use this algorithm */ char usable; /* whether we can use this algorithm */

View File

@ -322,7 +322,7 @@ void buf_put_algolist(buffer * buf, algo_type localalgos[]) {
buf_putbyte(algolist, ','); buf_putbyte(algolist, ',');
donefirst = 1; donefirst = 1;
len = strlen(localalgos[i].name); 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, algolist->data, algolist->len);