index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2019-04-05 00:02:51 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-05-08 10:12:14 +1000 |
commit | f2a7fb2b96dd76f48b7750d1edeb6a85b7006856 (patch) | |
tree | a6580f932f6d93e5ee042c6376af018ccb06b10f | |
parent | a8b3d1a62afaeee4f1586f6c463f6bf51f7a2d70 (diff) |
-rw-r--r-- | lib/libalpm/alpm.c | 2 | ||||
-rw-r--r-- | src/pacman/conf.c | 4 |
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 0f3db6f4..bd7a129a 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -68,7 +68,7 @@ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath, * with a slash) correctly, we skip SYSHOOKDIR[0]; the regular +1 therefore * disappears from the allocation */ MALLOC(hookdir, strlen(myhandle->root) + strlen(SYSHOOKDIR), goto nomem); - sprintf(hookdir, "%s%s", myhandle->root, SYSHOOKDIR + 1); + sprintf(hookdir, "%s%s", myhandle->root, &SYSHOOKDIR[1]); myhandle->hookdirs = alpm_list_add(NULL, hookdir); /* set default database extension */ diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 3b79fbc7..2d8518c4 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -975,11 +975,11 @@ int setdefaults(config_t *c) if(c->rootdir) { char path[PATH_MAX]; if(!c->dbpath) { - snprintf(path, PATH_MAX, "%s/%s", c->rootdir, DBPATH + 1); + snprintf(path, PATH_MAX, "%s/%s", c->rootdir, &DBPATH[1]); SETDEFAULT(c->dbpath, strdup(path)); } if(!c->logfile) { - snprintf(path, PATH_MAX, "%s/%s", c->rootdir, LOGFILE + 1); + snprintf(path, PATH_MAX, "%s/%s", c->rootdir, &LOGFILE[1]); SETDEFAULT(c->logfile, strdup(path)); } } else { |