mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 04:57:59 -05:00
Fix variable naming issues in _alpm_db_cmp
When this function got a rewrite in commit f43805d875
, argument and variable
names got a bit mixed up when separating the casts from the strcmp
operation. Fix the mixup which also fixes a possible segfault when this
function is called.
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
f201f107db
commit
57393eb730
@ -358,8 +358,8 @@ void _alpm_db_free(pmdb_t *db)
|
|||||||
|
|
||||||
int _alpm_db_cmp(const void *d1, const void *d2)
|
int _alpm_db_cmp(const void *d1, const void *d2)
|
||||||
{
|
{
|
||||||
pmdb_t *db1 = (pmdb_t *)db1;
|
pmdb_t *db1 = (pmdb_t *)d1;
|
||||||
pmdb_t *db2 = (pmdb_t *)db2;
|
pmdb_t *db2 = (pmdb_t *)d2;
|
||||||
return(strcmp(db1->treename, db2->treename));
|
return(strcmp(db1->treename, db2->treename));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ struct __pmdb_t {
|
|||||||
/* db.c, database general calls */
|
/* db.c, database general calls */
|
||||||
pmdb_t *_alpm_db_new(const char *dbpath, const char *treename);
|
pmdb_t *_alpm_db_new(const char *dbpath, const char *treename);
|
||||||
void _alpm_db_free(pmdb_t *db);
|
void _alpm_db_free(pmdb_t *db);
|
||||||
int _alpm_db_cmp(const void *db1, const void *db2);
|
int _alpm_db_cmp(const void *d1, const void *d2);
|
||||||
alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
|
alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles);
|
||||||
pmdb_t *_alpm_db_register_local(void);
|
pmdb_t *_alpm_db_register_local(void);
|
||||||
pmdb_t *_alpm_db_register_sync(const char *treename);
|
pmdb_t *_alpm_db_register_sync(const char *treename);
|
||||||
|
Loading…
Reference in New Issue
Block a user