Skip to contentSkip to conversation

master - dmstats: fix TIMERFD _timer_running() test

PATCH Bryn Reeves 1 participant 1 message Dec 18, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3e53adf7c0b83194a74a9fa75a7ebbf1c077de9a
Commit:        3e53adf7c0b83194a74a9fa75a7ebbf1c077de9a
Parent:        5a4750d76c9930a6e4a181ab664f0cac4d1a400b
Author:        Bryn M. Reeves <[email protected]>
AuthorDate:    Sun Dec 18 14:07:25 2016 +0000
Committer:     Bryn M. Reeves <[email protected]>
CommitterDate: Sun Dec 18 14:07:25 2016 +0000

dmstats: fix TIMERFD _timer_running() test

---
 tools/dmsetup.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
tools/dmsetup.c +1 -4
index 06d609b..e5ac80a 100644
@@ -652,10 +652,7 @@ static int _do_timer_wait(void)
 
 static int _timer_running(void)
 {
-	/*
-	 * Clock shutdown for exit - nothing to do.
-	 */
-	return ((_timer_fd == TIMER_STOPPED) && !_cycle_timestamp);
+	return ((_timer_fd != TIMER_STOPPED) || _cycle_timestamp);
 }
 
 #else /* !HAVE_SYS_TIMERFD_H */