Browse Source

config: be a little less cryptic on what's going on in load_default_profile().

djm34
Noel Maersk 11 years ago
parent
commit
5430d1ee91
  1. 19
      config_parser.c

19
config_parser.c

@ -658,12 +658,22 @@ void load_default_profile() @@ -658,12 +658,22 @@ void load_default_profile()
{
struct profile *profile;
//if a default profile name is set
if(!empty_string(default_profile.name))
if(empty_string(default_profile.name))
{
//find profile and copy settings
if((profile = get_profile(default_profile.name)))
applog(LOG_WARNING, "Default profile name not set.");
return;
}
else
{
// find profile ...
profile = get_profile(default_profile.name);
if (!profile) {
applog(LOG_WARNING, "Could not load default profile %s",
default_profile.name);
return;
}
// ... and copy settings
default_profile.algorithm = profile->algorithm;
default_profile.devices = profile->devices;
default_profile.lookup_gap = profile->lookup_gap;
@ -683,7 +693,6 @@ void load_default_profile() @@ -683,7 +693,6 @@ void load_default_profile()
default_profile.worksize = profile->worksize;
}
}
}
//apply default settings
void apply_defaults()

Loading…
Cancel
Save