summaryrefslogtreecommitdiffstats
path: root/src/trex_watchdog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/trex_watchdog.cpp')
-rw-r--r--src/trex_watchdog.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/trex_watchdog.cpp b/src/trex_watchdog.cpp
index d2b6b803..8a06746b 100644
--- a/src/trex_watchdog.cpp
+++ b/src/trex_watchdog.cpp
@@ -155,16 +155,14 @@ void TrexWatchDog::init(bool enable){
*
*/
TrexMonitor * TrexWatchDog::get_current_monitor() {
- TrexMonitor * cur_monitor = NULL;
for (int i = 0; i < m_mon_count; i++) {
if ( m_monitors[i]->get_tid() == pthread_self() ) {
- cur_monitor = m_monitors[i];
- break;
+ return m_monitors[i];
}
}
- return cur_monitor;
+ return NULL;
}