diff options
Diffstat (limited to 'strings')
-rw-r--r-- | strings/my_vsnprintf.c | 5 |
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; } |