mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-15 13:34:35 +03:00
Use of NULL in execlp() must have a pointer cast.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
This commit is contained in:
@ -219,6 +219,8 @@ static void updateViaExec(void) {
|
||||
exit(1);
|
||||
dup2(fdnull, STDERR_FILENO);
|
||||
close(fdnull);
|
||||
// Use of NULL in variadic functions must have a pointer cast.
|
||||
// The NULL constant is not required by standard to have a pointer type.
|
||||
execlp("systemctl",
|
||||
"systemctl",
|
||||
"show",
|
||||
@ -227,7 +229,7 @@ static void updateViaExec(void) {
|
||||
"--property=NNames",
|
||||
"--property=NJobs",
|
||||
"--property=NInstalledJobs",
|
||||
NULL);
|
||||
(char *)NULL);
|
||||
exit(127);
|
||||
}
|
||||
close(fdpair[1]);
|
||||
|
Reference in New Issue
Block a user