index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2007-10-29 01:00:52 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-10-29 01:00:52 -0500 |
commit | cc754bc6e3be0f37ca0eaca4b6b90f033433fb1a (patch) | |
tree | a9940053625e4b4e9b5d345eb1ac441a911f6efa /lib/libalpm/conflict.c | |
parent | fe3a461703a5d90937c0c6f1ce0c3d802c0f8630 (diff) |
-rw-r--r-- | lib/libalpm/conflict.c | 9 |
diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c index d09c996d..0baef8d1 100644 --- a/lib/libalpm/conflict.c +++ b/lib/libalpm/conflict.c @@ -239,12 +239,9 @@ static alpm_list_t *add_fileconflict(alpm_list_t *conflicts, pmconflicttype_t type, const char *filestr, const char* name1, const char* name2) { - pmconflict_t *conflict = malloc(sizeof(pmconflict_t)); - if(conflict == NULL) { - _alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes\n"), - sizeof(pmconflict_t)); - return(conflicts); - } + pmconflict_t *conflict; + MALLOC(conflict, sizeof(pmconflict_t), return(conflicts)); + conflict->type = type; strncpy(conflict->target, name1, PKG_NAME_LEN); strncpy(conflict->file, filestr, CONFLICT_FILE_LEN); |