[PATCH] cygwin: timer_delete: Fix return value
Christian Franke
Christian.Franke@t-online.de
Sat Oct 12 16:58:15 GMT 2024
Nobody checks the return value of functions which only free resources:
close(), ..., timer_delete(), ... :-)
--
Regards,
Christian
-------------- next part --------------
From 2d0c5b53bba2ded8d85ed725774498cffbb4f1de Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Sat, 12 Oct 2024 18:47:00 +0200
Subject: [PATCH] cygwin: timer_delete: Fix return value
timer_delete() always returned failure. This issue has been
detected by 'stress-ng --hrtimers 1'.
Signed-off-by: Christian Franke <christian.franke@t-online.de>
---
winsup/cygwin/posix_timer.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/winsup/cygwin/posix_timer.cc b/winsup/cygwin/posix_timer.cc
index 9d832f201..a336b2bc2 100644
--- a/winsup/cygwin/posix_timer.cc
+++ b/winsup/cygwin/posix_timer.cc
@@ -530,6 +530,7 @@ timer_delete (timer_t timerid)
__leave;
}
delete in_tt;
+ ret = 0;
}
__except (EFAULT) {}
__endtry
--
2.45.1
More information about the Cygwin-patches
mailing list