summaryrefslogtreecommitdiff
path: root/mysys/my_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r--mysys/my_init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c
index edc37a3c96f..b330ffac65a 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -153,9 +153,11 @@ void my_end(int infoflag)
{ /* Test if some file is left open */
if (my_file_opened | my_stream_opened)
{
- sprintf(errbuff[0],EE(EE_OPEN_WARNING),my_file_opened,my_stream_opened);
- (void) my_message_no_curses(EE_OPEN_WARNING,errbuff[0],ME_BELL);
- DBUG_PRINT("error",("%s",errbuff[0]));
+ char ebuff[512];
+ my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING),
+ my_file_opened, my_stream_opened);
+ my_message_no_curses(EE_OPEN_WARNING, ebuff, ME_BELL);
+ DBUG_PRINT("error", ("%s", ebuff));
my_print_open_files();
}
}