chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89de694
)
journal: Set the last_unused pointer correctly when attaching an unused window
author
Colin Guthrie
<colin@mageia.org>
Tue, 16 Oct 2012 11:03:37 +0000
(12:03 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 16 Oct 2012 14:14:46 +0000
(16:14 +0200)
It seems the previous code was copy/pasted from context_detach_window()
but not updated.
src/journal/mmap-cache.c
patch
|
blob
|
history
diff --git
a/src/journal/mmap-cache.c
b/src/journal/mmap-cache.c
index 7813f037544546fe8bf8e33c85c6768acce001a0..251aefe12113c3805583ab04a2cf9a0a9b48128d 100644
(file)
--- a/
src/journal/mmap-cache.c
+++ b/
src/journal/mmap-cache.c
@@
-205,8
+205,8
@@
static void context_attach_window(Context *c, Window *w) {
if (w->in_unused) {
/* Used again? */
LIST_REMOVE(Window, unused, c->cache->unused, w);
- if (
!c->cache->last_unused
)
- c->cache->last_unused = w;
+ if (
c->cache->last_unused == w
)
+ c->cache->last_unused = w
->unused_prev
;
w->in_unused = false;
}