diff options
author | Dan McGee <dan@archlinux.org> | 2011-05-04 15:48:47 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-05-04 15:48:47 -0500 |
commit | e8a40526cb3be82c5019f0ee3f592a08b3387fa9 (patch) | |
tree | df47b16beb2dfcfd42d2bc94379725082b653f7c /lib/libalpm/conflict.c | |
parent | c03faa32f335f3fb7bc1bc8718dd1781781ef3dd (diff) | |
download | pacman-e8a40526cb3be82c5019f0ee3f592a08b3387fa9.tar.xz |
Fix warnings reported by -Wwrite-strings
These are places where we stuck a string constant in a variable not
marked as const.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/conflict.c')
-rw-r--r-- | lib/libalpm/conflict.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index 319e49d6..fbc988bd 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -287,7 +287,7 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts, if(name2) { STRDUP(conflict->ctarget, name2, RET_ERR(PM_ERR_MEMORY, NULL)); } else { - conflict->ctarget = ""; + STRDUP(conflict->ctarget, "", RET_ERR(PM_ERR_MEMORY, NULL)); } conflicts = alpm_list_add(conflicts, conflict); @@ -299,10 +299,8 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts, void _alpm_fileconflict_free(pmfileconflict_t *conflict) { - if(strlen(conflict->ctarget) > 0) { - FREE(conflict->ctarget); - } - FREE(conflict->file);; + FREE(conflict->ctarget); + FREE(conflict->file); FREE(conflict->target); FREE(conflict); } |