Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
morganamilo
8b35654474
libalpm: use null for no alpm_fileconflict_t->ctarget 2021-12-09 20:14:33 +00:00
2 changed files with 1 additions and 2 deletions

View file

@ -269,7 +269,6 @@ static alpm_list_t *add_fileconflict(alpm_handle_t *handle,
STRDUP(conflict->file, filestr, goto error); STRDUP(conflict->file, filestr, goto error);
if(!pkg2) { if(!pkg2) {
conflict->type = ALPM_FILECONFLICT_FILESYSTEM; conflict->type = ALPM_FILECONFLICT_FILESYSTEM;
STRDUP(conflict->ctarget, "", goto error);
} else if(pkg2->origin == ALPM_PKG_FROM_LOCALDB) { } else if(pkg2->origin == ALPM_PKG_FROM_LOCALDB) {
conflict->type = ALPM_FILECONFLICT_FILESYSTEM; conflict->type = ALPM_FILECONFLICT_FILESYSTEM;
STRDUP(conflict->ctarget, pkg2->name, goto error); STRDUP(conflict->ctarget, pkg2->name, goto error);

View file

@ -840,7 +840,7 @@ int sync_prepare_execute(void)
conflict->file, conflict->target, conflict->ctarget); conflict->file, conflict->target, conflict->ctarget);
break; break;
case ALPM_FILECONFLICT_FILESYSTEM: case ALPM_FILECONFLICT_FILESYSTEM:
if(conflict->ctarget[0]) { if(conflict->ctarget) {
printf(_("%s: %s exists in filesystem (owned by %s)\n"), printf(_("%s: %s exists in filesystem (owned by %s)\n"),
conflict->target, conflict->file, conflict->ctarget); conflict->target, conflict->file, conflict->ctarget);
} else { } else {