summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3c3fe0)
raw | patch | inline | side by side (parent: c3c3fe0)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Jul 2016 12:50:17 +0000 (14:50 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Jul 2016 12:50:17 +0000 (14:50 +0200) |
src/daemon/utils_threshold.c | patch | blob | history |
index 4a8df89d69e70c147e1fa8820c7884d1931b427c..cb1ea34a16f25851dd397c30bb07477b6f09ae1d 100644 (file)
if (vl == NULL)
return (EINVAL);
- /* Is this lock really necessary? */
- pthread_mutex_lock (&threshold_lock);
+ /* Is this lock really necessary? */
+ pthread_mutex_lock (&threshold_lock);
t = threshold_search (vl);
if (t == NULL) {
- pthread_mutex_unlock (&threshold_lock);
+ pthread_mutex_unlock (&threshold_lock);
return (ENOENT);
- }
+ }
memcpy (ret_threshold, t, sizeof (*ret_threshold));
- pthread_mutex_unlock (&threshold_lock);
+ pthread_mutex_unlock (&threshold_lock);
ret_threshold->next = NULL;