summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pacman/conf.c2
-rw-r--r--src/pacman/pacman.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 5028284d..873ca0ee 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -459,7 +459,7 @@ static int process_cleanmethods(alpm_list_t *values,
static void setrepeatingoption(char *ptr, const char *option,
alpm_list_t **list)
{
- char *val, *saveptr;
+ char *val, *saveptr = NULL;
val = strtok_r(ptr, " ", &saveptr);
while(val) {
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index f43105ab..6f05c68c 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -341,8 +341,7 @@ static void invalid_opt(int used, const char *opt1, const char *opt2)
static int parsearg_util_addlist(alpm_list_t **list)
{
- char *i, *save;
-
+ char *i, *save = NULL;
for(i = strtok_r(optarg, ",", &save); i; i = strtok_r(NULL, ",", &save)) {
*list = alpm_list_add(*list, strdup(i));