1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-12 04:15:06 -05:00

Fix assignment before NULL check

Easy fix, found using null_ref.cocci example Coccinelle script.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-03-20 19:56:55 -05:00
parent 67c0e9cab3
commit bdc1508a06

View File

@ -995,10 +995,10 @@ pmdb_t *_alpm_db_register_local(void)
_alpm_log(PM_LOG_DEBUG, "registering local database\n");
db = _alpm_db_new("local", 1);
db->ops = &local_db_ops;
if(db == NULL) {
RET_ERR(PM_ERR_DB_CREATE, NULL);
}
db->ops = &local_db_ops;
handle->db_local = db;
return(db);