mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +00:00
Fix #404: possible undefined behavior --without-fstab
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
0cae7d44dd
commit
4a2381eb6f
1 file changed
+4
-1
+4
-1
@@ -348,8 +348,11 @@ static void parse_kernel_loglevel(void)
|
|||||||
*/
|
*/
|
||||||
void conf_parse_cmdline(int argc, char *argv[])
|
void conf_parse_cmdline(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
const char *ptr;
|
||||||
|
|
||||||
/* Set up defaults */
|
/* Set up defaults */
|
||||||
fstab = strdup(FINIT_FSTAB);
|
if ((ptr = FINIT_FSTAB))
|
||||||
|
fstab = strdup(ptr);
|
||||||
finit_conf = strdup(FINIT_CONF);
|
finit_conf = strdup(FINIT_CONF);
|
||||||
finit_rcsd = strdup(FINIT_RCSD);
|
finit_rcsd = strdup(FINIT_RCSD);
|
||||||
path = getenv("PATH");
|
path = getenv("PATH");
|
||||||
|
|||||||
Reference in new issue
Block a user