From 7e922b05844fd3c4db51b565c1b946eb2f92f0fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 14 Jun 2022 14:40:30 +0200 Subject: sd-event: let sd_event_source_set_enabled accept NULL Same story as before: disabling a non-existent event source shouldn't need to be guarded by an if. I retained the wrapper so that that we don't have to say SD_EVENT_OFF in the many places where this is called. --- man/sd_event_source_set_enabled.xml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'man/sd_event_source_set_enabled.xml') diff --git a/man/sd_event_source_set_enabled.xml b/man/sd_event_source_set_enabled.xml index d6cdf85eda..5f13fc101d 100644 --- a/man/sd_event_source_set_enabled.xml +++ b/man/sd_event_source_set_enabled.xml @@ -53,16 +53,15 @@ Description - sd_event_source_set_enabled() may be - used to enable or disable the event source object specified as - source. The enabled - parameter takes one of SD_EVENT_ON (to - enable), SD_EVENT_OFF (to disable) or - SD_EVENT_ONESHOT. If invoked with - SD_EVENT_ONESHOT the event source will be - enabled but automatically reset to - SD_EVENT_OFF after the event source was - dispatched once. + sd_event_source_set_enabled() may be used to enable or disable the event + source object specified as source. The enabled parameter + takes one of SD_EVENT_ON (to enable), SD_EVENT_OFF (to disable) + or SD_EVENT_ONESHOT. If invoked with SD_EVENT_ONESHOT the event + source will be enabled but automatically reset to SD_EVENT_OFF after one dispatch. + For SD_EVENT_OFF, the event source source may be + NULL, in which case the function does nothing. Otherwise, + source must be a valid pointer to an sd_event_source + object. Event sources that are disabled will not result in event loop wakeups and will not be dispatched, until they are enabled -- cgit v1.2.1