Use a global configuration variable
This is one of the few valid use cases for a global variable. No need to make it pseudo-local and pass it from one function to another. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -154,8 +154,6 @@ daemonize (int status)
|
||||
void
|
||||
dmon_start (int parent_exit_status)
|
||||
{
|
||||
struct conf conf;
|
||||
|
||||
if (!daemonize (parent_exit_status))
|
||||
DMON_ABRT (_("Cannot daemonize, aborting\n"));
|
||||
|
||||
@@ -165,7 +163,7 @@ dmon_start (int parent_exit_status)
|
||||
if (!io_file_exist (path_conf))
|
||||
DMON_ABRT (_("Could not access \"%s\": %s\n"),
|
||||
path_conf, strerror (errno));
|
||||
custom_load_conf (&conf);
|
||||
custom_load_conf ();
|
||||
|
||||
if (!io_file_exist (path_apts))
|
||||
DMON_ABRT (_("Could not access \"%s\": %s\n"),
|
||||
|
||||
Reference in New Issue
Block a user