Verified Commit 8b356544 authored by Morgan Adamiec's avatar Morgan Adamiec
Browse files

libalpm: use null for no alpm_fileconflict_t->ctarget

parent 39c3cbdf
Pipeline #13879 passed with stage
in 2 minutes and 13 seconds
......@@ -269,7 +269,6 @@ static alpm_list_t *add_fileconflict(alpm_handle_t *handle,
STRDUP(conflict->file, filestr, goto error);
if(!pkg2) {
conflict->type = ALPM_FILECONFLICT_FILESYSTEM;
STRDUP(conflict->ctarget, "", goto error);
} else if(pkg2->origin == ALPM_PKG_FROM_LOCALDB) {
conflict->type = ALPM_FILECONFLICT_FILESYSTEM;
STRDUP(conflict->ctarget, pkg2->name, goto error);
......
......@@ -840,7 +840,7 @@ int sync_prepare_execute(void)
conflict->file, conflict->target, conflict->ctarget);
break;
case ALPM_FILECONFLICT_FILESYSTEM:
if(conflict->ctarget[0]) {
if(conflict->ctarget) {
printf(_("%s: %s exists in filesystem (owned by %s)\n"),
conflict->target, conflict->file, conflict->ctarget);
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment