|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 4dd6c5726d87a336888c0d871b9260c98f689016 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Michal Schmidt <mschmidt@redhat.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Mon, 4 Aug 2014 22:54:10 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] sd-bus: use proper ITERATOR_FIRST abstraction
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Do not assume hashmap iterators are pointers.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
They may be structs in an alternative hashmap implementation.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/libsystemd/sd-bus/bus-track.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/libsystemd/sd-bus/bus-track.c b/src/libsystemd/sd-bus/bus-track.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 0a3322a4ee..4b6a8bfee9 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/libsystemd/sd-bus/bus-track.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/libsystemd/sd-bus/bus-track.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -245,7 +245,7 @@ _public_ const char* sd_bus_track_first(sd_bus_track *track) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
track->modified = false;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- track->iterator = NULL;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ track->iterator = ITERATOR_FIRST;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
hashmap_iterate(track->names, &track->iterator, (const void**) &n);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return n;
|