summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-11-26 13:04:36 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-12 20:27:29 +0100
commit46ae210422c58963786e26af94152e591bb1a098 (patch)
tree34822b7f43b97b2351ef5448fd101db97949c1a7 /strings
parent590d473760433afde9f52cae43850898970805a8 (diff)
downloadmariadb-git-46ae210422c58963786e26af94152e591bb1a098.tar.gz
cleanup: my_strerror
Diffstat (limited to 'strings')
-rw-r--r--strings/my_vsnprintf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index ad270bd9b64..b2ff1e0fa2c 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -790,7 +790,7 @@ int my_fprintf(FILE *stream, const char* format, ...)
@param nr Error number
*/
-void my_strerror(char *buf, size_t len, int nr)
+const char* my_strerror(char *buf, size_t len, int nr)
{
char *msg= NULL;
@@ -802,7 +802,7 @@ void my_strerror(char *buf, size_t len, int nr)
"Internal error/check (Not system error)" :
"Internal error < 0 (Not system error)"),
len-1);
- return;
+ return buf;
}
/*
@@ -843,4 +843,5 @@ void my_strerror(char *buf, size_t len, int nr)
*/
if (!buf[0])
strmake(buf, "unknown error", len - 1);
+ return buf;
}