Skip to content

Commit

Permalink
vpn: Use function to trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeerw authored and pfl committed Aug 28, 2013
1 parent 2d61b56 commit 4c66d75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions vpn/vpn-config.c
Expand Up @@ -332,13 +332,13 @@ static int load_config(struct vpn_config *config, char *path, enum what action)
/* Verify keys validity of the global section */
check_keys(keyfile, "global", config_possible_keys);

str = g_key_file_get_string(keyfile, "global", CONFIG_KEY_NAME, NULL);
str = __vpn_config_get_string(keyfile, "global", CONFIG_KEY_NAME, NULL);
if (str) {
g_free(config->name);
config->name = str;
}

str = g_key_file_get_string(keyfile, "global", CONFIG_KEY_DESC, NULL);
str = __vpn_config_get_string(keyfile, "global", CONFIG_KEY_DESC, NULL);
if (str) {
g_free(config->description);
config->description = str;
Expand Down
10 changes: 5 additions & 5 deletions vpn/vpn-provider.c
Expand Up @@ -743,15 +743,15 @@ static int provider_load_from_keyfile(struct vpn_provider *provider,
key = settings[idx];
if (key) {
if (g_str_equal(key, "Networks")) {
networks = g_key_file_get_string_list(keyfile,
networks = __vpn_config_get_string_list(keyfile,
provider->identifier,
key,
&num_user_networks,
NULL);
provider->user_networks = get_routes(networks);

} else {
value = g_key_file_get_string(keyfile,
value = __vpn_config_get_string(keyfile,
provider->identifier,
key, NULL);
vpn_provider_set_string(provider, key,
Expand Down Expand Up @@ -1735,7 +1735,7 @@ static void provider_create_all_from_type(const char *provider_type)
if (!keyfile)
continue;

type = g_key_file_get_string(keyfile, id, "Type", NULL);
type = __vpn_config_get_string(keyfile, id, "Type", NULL);

DBG("keyfile %p id %s type %s", keyfile, id, type);

Expand Down Expand Up @@ -2577,12 +2577,12 @@ static void remove_unprovisioned_providers()
if (!keyfile)
continue;

file = g_key_file_get_string(keyfile, group,
file = __vpn_config_get_string(keyfile, group,
"Config.file", NULL);
if (!file)
goto next;

section = g_key_file_get_string(keyfile, group,
section = __vpn_config_get_string(keyfile, group,
"Config.ident", NULL);
if (!section)
goto next;
Expand Down

0 comments on commit 4c66d75

Please sign in to comment.