mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-05 00:59:06 -04:00
Initialize slaveresult to 0 and use strncat instead of bsd strlcat
This commit is contained in:
parent
c405dbafcc
commit
ce355c80cf
1 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ main (int argc, char **argv)
|
|||
|
||||
char *result = NULL;
|
||||
char *error = NULL;
|
||||
char slaveresult[SLAVERESULTSIZE];
|
||||
char slaveresult[SLAVERESULTSIZE] = { 0 };
|
||||
char* perf;
|
||||
|
||||
perf = strdup ("");
|
||||
|
|
@ -299,7 +299,7 @@ main (int argc, char **argv)
|
|||
if (mysqldump_threads == 0) {
|
||||
die (STATE_CRITICAL, "%s\n", slaveresult);
|
||||
} else {
|
||||
strlcat (slaveresult, " Mysqldump: in progress", SLAVERESULTSIZE);
|
||||
strncat(slaveresult, " Mysqldump: in progress", SLAVERESULTSIZE-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue