From c07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 15:43:52 +0200 Subject: Imported Upstream version 1.6.3 --- ucmm/ucmm.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'ucmm') 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) { -- cgit v1.2.3