use sizeof instead of hardcoded value
This commit is contained in:
parent
02edbf8e44
commit
781b702d7d
@ -231,7 +231,7 @@ bool run_prog(const char *eventfile, uint32_t eventmask)
|
|||||||
argv0 = ( argv0 == NULL ) ? prog : argv0+1;
|
argv0 = ( argv0 == NULL ) ? prog : argv0+1;
|
||||||
|
|
||||||
char envvar[30];
|
char envvar[30];
|
||||||
snprintf(envvar, 30, "adhocifyevent=%"PRIu32, eventmask);
|
snprintf(envvar, sizeof(envvar), "adhocifyevent=%"PRIu32, eventmask);
|
||||||
putenv(envvar);
|
putenv(envvar);
|
||||||
|
|
||||||
execl(prog, argv0, (! noappend) ? eventfile : NULL, NULL);
|
execl(prog, argv0, (! noappend) ? eventfile : NULL, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user