mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Cleanup gcc warning: null argument where non-null required (arg.2)
As the const declaration of execvp is a bit weird, using local dmeventdpath string.
This commit is contained in:
parent
4269e36315
commit
5a4eeb69c4
@ -398,6 +398,8 @@ static int _start_daemon(struct dm_event_fifos *fifos)
|
||||
int pid, ret = 0;
|
||||
int status;
|
||||
struct stat statbuf;
|
||||
char dmeventdpath[] = DMEVENTD_PATH; /* const type for execvp */
|
||||
char * const args[] = { dmeventdpath, NULL };
|
||||
|
||||
if (stat(fifos->client_path, &statbuf))
|
||||
goto start_server;
|
||||
@ -437,7 +439,7 @@ static int _start_daemon(struct dm_event_fifos *fifos)
|
||||
log_error("Unable to fork.");
|
||||
|
||||
else if (!pid) {
|
||||
execvp(DMEVENTD_PATH, NULL);
|
||||
execvp(args[0], args);
|
||||
_exit(EXIT_FAILURE);
|
||||
} else {
|
||||
if (waitpid(pid, &status, 0) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user