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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue