[systemd-commits] 2 commits - fixme src/hashmap.h

Lennart Poettering lennart at kemper.freedesktop.org
Mon Sep 27 11:15:56 PDT 2010


 fixme         |    5 +----
 src/hashmap.h |    6 +++---
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit aed5e44d50656fc5b07e47a717cfe57cc08adc0f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Sep 27 20:13:21 2010 +0200

    Revert "hashmap: HASHMAP_FOREACH* iterate until ITERATOR_LAST"
    
    This reverts commit 66d9b3b59551a33398b2201662af5c8c17a367c9.
    
    If we check for i == ITERATOR_LAST we exit the loop one entry before the
    end. Instead we should return if e is NULL.

diff --git a/src/hashmap.h b/src/hashmap.h
index 9f89d7c..ac5a8ae 100644
--- a/src/hashmap.h
+++ b/src/hashmap.h
@@ -77,12 +77,12 @@ void* hashmap_first(Hashmap *h);
 void* hashmap_last(Hashmap *h);
 
 #define HASHMAP_FOREACH(e, h, i) \
-        for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (i) != ITERATOR_LAST; (e) = hashmap_iterate((h), &(i), NULL))
+        for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL))
 
 #define HASHMAP_FOREACH_KEY(e, k, h, i) \
-        for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (i) != ITERATOR_LAST; (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
+        for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
 
 #define HASHMAP_FOREACH_BACKWARDS(e, h, i) \
-        for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (i) != ITERATOR_FIRST; (e) = hashmap_iterate_backwards((h), &(i), NULL))
+        for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL))
 
 #endif
commit 313ed05bdb2350776e1332a68e2ff85a5e9fc4d3
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Sep 27 20:10:11 2010 +0200

    update fixme

diff --git a/fixme b/fixme
index ebc8790..89e279b 100644
--- a/fixme
+++ b/fixme
@@ -16,9 +16,6 @@
 
 * implicitly import "defaults" settings file into all types
 
-* add #ifdefs for non-sysv builds
-  ABI: sysv "legacy", disable D-Bus export if not compiled-in
-
 * "disabled" load state?
 
 * ability to kill services? i.e. in contrast to stopping them, go directly
@@ -62,7 +59,7 @@
 
 * ConditionFileExists=, ConditionKernelCommandLine=, ConditionEnvironment= with !
 
-* accountsservice is dod
+* accountsservice is borked
 
 * auditd service files
 


More information about the systemd-commits mailing list