Type improvements to the internal encrypt/decrypt and CTCP quoting API

Use size_t for passing buffer lengths, and const char * for encryption keys and other non-modified buffer
arguments.

Remove pointless helper function do_crypt().
This commit is contained in:
Kevin Easton
2017-06-28 16:54:11 +10:00
parent c62e099d80
commit 9b0d3e4ab5
6 changed files with 61 additions and 76 deletions

View File

@@ -249,8 +249,8 @@ extern Function_ptr *global;
#define bsd_globfree (*(void (*)(glob_t *))global[BSD_GLOBFREE])
/* misc commands */
#define my_encrypt (*(void (*)(char *, int , char *))global[MY_ENCRYPT])
#define my_decrypt (*(void (*)(char *, int , char *))global[MY_DECRYPT])
#define my_encrypt (*(void (*)(char *, int , const char *))global[MY_ENCRYPT])
#define my_decrypt (*(void (*)(char *, int , const char *))global[MY_DECRYPT])
#define prepare_command (*(ChannelList *(*)(int *, char *, int))global[PREPARE_COMMAND])
#define convert_output_format (*(char *(*)(const char *, const char *, ...))global[CONVERT_OUTPUT_FORMAT])
#define userage (*(void (*)(char *, char *))global[USERAGE])