summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pacman/pacman.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index c138c2c4..05738c33 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -486,27 +486,12 @@ int main(int argc, char *argv[])
config->root = PM_ROOT;
}
- char *initroot = NULL;
- /* add a trailing '/' if there isn't one */
- if(config->root[strlen(config->root)-1] != '/') {
- char *ptr;
- MALLOC(ptr, strlen(config->root)+2);
- strcpy(ptr, config->root);
- strcat(ptr, "/");
- initroot = ptr;
- } else {
- initroot = strdup(config->root);
- }
-
/* initialize pm library */
- if(alpm_initialize(initroot) == -1) {
+ if(alpm_initialize(config->root) == -1) {
ERR(NL, _("failed to initilize alpm library (%s)\n"), alpm_strerror(pm_errno));
cleanup(1);
}
- FREE(initroot);
- config->root = alpm_option_get_root();
-
/* Setup logging as soon as possible, to print out maximum debugging info */
alpm_option_set_logmask(config->debug);
alpm_option_set_logcb(cb_log);