mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 15:44:11 +02:00
Fix compiler warning in Process::Run
This commit is contained in:
parent
f41f9b085d
commit
767ddbdec7
@ -546,8 +546,8 @@ void Process::Run(const boost::function<void(const ProcessResult&)>& callback)
|
|||||||
if (icinga2_execvpe(argv[0], argv, envp) < 0) {
|
if (icinga2_execvpe(argv[0], argv, envp) < 0) {
|
||||||
char errmsg[512];
|
char errmsg[512];
|
||||||
strcpy(errmsg, "execvpe(");
|
strcpy(errmsg, "execvpe(");
|
||||||
strncat(errmsg, argv[0], sizeof(errmsg) - 1);
|
strncat(errmsg, argv[0], sizeof(errmsg) - strlen(errmsg) - 1);
|
||||||
strncat(errmsg, ") failed", sizeof(errmsg) - 1);
|
strncat(errmsg, ") failed", sizeof(errmsg) - strlen(errmsg) - 1);
|
||||||
errmsg[sizeof(errmsg) - 1] = '\0';
|
errmsg[sizeof(errmsg) - 1] = '\0';
|
||||||
perror(errmsg);
|
perror(errmsg);
|
||||||
_exit(128);
|
_exit(128);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user