diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-01-28 23:56:27 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2011-01-28 23:57:48 +0200 |
commit | 5ac0142426d3e286117962cb997c5822633e43d5 (patch) | |
tree | 01bc5fa7175c27bdb624c8924edfdc112d32fea4 /plugins | |
parent | c614654d76da74a51a18c7d4474a8046ca6bda01 (diff) | |
download | bluez-5ac0142426d3e286117962cb997c5822633e43d5.tar.gz |
hciops: Use g_slist_prepend instead of g_slist_append for storing keys
Once a key is generated it's likely to be used soon again. Therefore,
store it in the beginning of the list for fast lookup.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/hciops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c index a416c2506..4a67920a6 100644 --- a/plugins/hciops.c +++ b/plugins/hciops.c @@ -887,7 +887,7 @@ done: return; } - dev->keys = g_slist_append(dev->keys, key_info); + dev->keys = g_slist_prepend(dev->keys, key_info); /* If we're connected and not dedicated bonding initiators we're * done with the bonding process */ |