Make modulecmd_argtype_to_str return values constant

The function needlessly allocated memory for the type strings.
This commit is contained in:
Markus Mäkelä
2017-05-29 14:59:30 +03:00
parent 948a059004
commit 7baa52b763
3 changed files with 21 additions and 38 deletions

View File

@ -263,6 +263,6 @@ bool modulecmd_foreach(const char *domain_re, const char *ident_re,
* @param type Type to convert
* @return New string or NULL on memory allocation error
*/
char* modulecmd_argtype_to_str(modulecmd_arg_type_t *type);
const char* modulecmd_argtype_to_str(modulecmd_arg_type_t *type);
MXS_END_DECLS