summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/bus-error.c8
-rw-r--r--src/libsystemd/sd-event/sd-event.c15
2 files changed, 10 insertions, 13 deletions
diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
index dac157be16..64a5a972ae 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -70,9 +70,11 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
SD_BUS_ERROR_MAP_END
};
-/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */
-extern const sd_bus_error_map __start_BUS_ERROR_MAP[];
-extern const sd_bus_error_map __stop_BUS_ERROR_MAP[];
+/* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section.
+ * Hide them; for currently unknown reasons they get exported to the shared libries
+ * even without being listed in the sym file. */
+extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_;
+extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_;
/* Additional maps registered with sd_bus_error_add_map() are in this
* NULL terminated array */
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 00880c983b..76964aa0cc 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -468,24 +468,22 @@ static bool event_pid_changed(sd_event *e) {
return e->original_pid != getpid();
}
-static int source_io_unregister(sd_event_source *s) {
+static void source_io_unregister(sd_event_source *s) {
int r;
assert(s);
assert(s->type == SOURCE_IO);
if (event_pid_changed(s->event))
- return 0;
+ return;
if (!s->io.registered)
- return 0;
+ return;
r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL);
- if (r < 0)
- return -errno;
+ assert_log(r >= 0);
s->io.registered = false;
- return 0;
}
static int source_io_register(
@@ -1457,10 +1455,7 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
switch (s->type) {
case SOURCE_IO:
- r = source_io_unregister(s);
- if (r < 0)
- return r;
-
+ source_io_unregister(s);
s->enabled = m;
break;