mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-11 20:05:07 -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:
parent
67c0e9cab3
commit
bdc1508a06
@ -995,10 +995,10 @@ pmdb_t *_alpm_db_register_local(void)
|
|||||||
_alpm_log(PM_LOG_DEBUG, "registering local database\n");
|
_alpm_log(PM_LOG_DEBUG, "registering local database\n");
|
||||||
|
|
||||||
db = _alpm_db_new("local", 1);
|
db = _alpm_db_new("local", 1);
|
||||||
db->ops = &local_db_ops;
|
|
||||||
if(db == NULL) {
|
if(db == NULL) {
|
||||||
RET_ERR(PM_ERR_DB_CREATE, NULL);
|
RET_ERR(PM_ERR_DB_CREATE, NULL);
|
||||||
}
|
}
|
||||||
|
db->ops = &local_db_ops;
|
||||||
|
|
||||||
handle->db_local = db;
|
handle->db_local = db;
|
||||||
return(db);
|
return(db);
|
||||||
|
Loading…
Reference in New Issue
Block a user