Return early and OK if signal watcher is already stopped

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-09-04 07:16:01 +02:00
parent 6ae98d135c
commit 6d33c56d0f
+3
View File
@@ -140,6 +140,9 @@ int uev_signal_start(uev_t *w)
*/
int uev_signal_stop(uev_t *w)
{
if (!_uev_watcher_active(w))
return 0;
if (_uev_watcher_stop(w))
return -1;