diff options
Diffstat (limited to 'ucmm')
-rw-r--r-- | ucmm/Makefile.am | 9 | ||||
-rw-r--r-- | ucmm/ucmm.c | 24 |
2 files changed, 12 insertions, 21 deletions
diff --git a/ucmm/Makefile.am b/ucmm/Makefile.am deleted file mode 100644 index 0140619..0000000 --- a/ucmm/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -include $(top_srcdir)/Makefile.shared - -privatelib_LTLIBRARIES = libucmm.la -privatelibdir = $(pkglibdir) - -libucmm_la_SOURCES = ucmm.h ucmm.c -libucmm_la_LIBADD = $(ICC_LIBS) ../jcnf/libjcnf.la ../spectro/libconv.la - -LDADD = libucmm.la 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) { |