diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-09-01 15:43:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2014-09-01 15:43:52 +0200 |
commit | c07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (patch) | |
tree | 41791cbe367cf023b98043fee56f9346b2592b49 /ucmm | |
parent | d7f89e6fe63b8697fab5a901cfce457b375638b3 (diff) |
Imported Upstream version 1.6.3upstream/1.6.3
Diffstat (limited to 'ucmm')
-rw-r--r-- | ucmm/ucmm.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ucmm/ucmm.c b/ucmm/ucmm.c index dc5598f..52bd8f0 100644 --- a/ucmm/ucmm.c +++ b/ucmm/ucmm.c @@ -213,9 +213,9 @@ ucmm_error ucmm_install_monitor_profile( char **paths; char *tt; - if (npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, + if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, scope == ucmm_local_system ? xdg_local : xdg_user, - config_file) == 0) { + config_file)) == 0) { return ucmm_open_config; } if ((conf_name = strdup(paths[0])) == NULL) { @@ -225,7 +225,7 @@ ucmm_error ucmm_install_monitor_profile( xdg_free(paths, npaths); /* Combined sub-path and profile name */ - if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(profile))) == NULL) + if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(profile) + 1)) == NULL) return ucmm_resource; strcpy(data_pathfile, profile_dir); @@ -238,9 +238,9 @@ ucmm_error ucmm_install_monitor_profile( tt = profile; strcat(data_pathfile, tt); - if (npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, + if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_write, scope == ucmm_local_system ? xdg_local : xdg_user, - data_pathfile) == 0) { + data_pathfile)) == 0) { free(data_pathfile); free(conf_name); return ucmm_open_config; @@ -514,9 +514,9 @@ ucmm_error ucmm_uninstall_monitor_profile( char **paths; char *tt; - if (npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, + if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, scope == ucmm_local_system ? xdg_local : xdg_user, - config_file) == 0) { + config_file)) == 0) { return ucmm_open_config; } if ((conf_name = strdup(paths[0])) == NULL) { @@ -527,7 +527,7 @@ ucmm_error ucmm_uninstall_monitor_profile( if (profile != NULL) { /* Combined sub-path and profile name */ - if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(profile))) == NULL) + if ((data_pathfile = malloc(strlen(profile_dir) + 1 + strlen(profile) + 1)) == NULL) return ucmm_resource; strcpy(data_pathfile, profile_dir); @@ -540,9 +540,9 @@ ucmm_error ucmm_uninstall_monitor_profile( tt = profile; strcat(data_pathfile, tt); - if (npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, + if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, scope == ucmm_local_system ? xdg_local : xdg_user, - data_pathfile) == 0) { + data_pathfile)) == 0) { free(data_pathfile); free(conf_name); return ucmm_open_config; @@ -796,9 +796,9 @@ ucmm_error ucmm_get_monitor_profile( char **paths; char *tt; - if (npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, + if ((npaths = xdg_bds(&er, &paths, xdg_conf, xdg_read, scope == ucmm_local_system ? xdg_local : xdg_user, - config_file) == 0) { + config_file)) == 0) { continue; } if ((conf_name = strdup(paths[0])) == NULL) { |