aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-registry/signals.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-11-05 00:09:50 +0100
committerMattias Andrée <maandree@kth.se>2017-11-05 00:09:50 +0100
commit9e8dec188d55ca1f0a3b33acab702ced8ed07a18 (patch)
treecbb43c22e72674dc672e645e6596358e3868568e /src/mds-registry/signals.c
parenttypo (diff)
downloadmds-9e8dec188d55ca1f0a3b33acab702ced8ed07a18.tar.gz
mds-9e8dec188d55ca1f0a3b33acab702ced8ed07a18.tar.bz2
mds-9e8dec188d55ca1f0a3b33acab702ced8ed07a18.tar.xz
Work on changing style, and an important typo fix
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/mds-registry/signals.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/mds-registry/signals.c b/src/mds-registry/signals.c
index 024e2f7..22be1aa 100644
--- a/src/mds-registry/signals.c
+++ b/src/mds-registry/signals.c
@@ -36,21 +36,20 @@
*/
void signal_all(int signo)
{
- pthread_t current_thread;
- ssize_t node;
-
- current_thread = pthread_self();
-
- if (pthread_equal(current_thread, master_thread) == 0)
- pthread_kill(master_thread, signo);
-
- with_mutex (slave_mutex,
- foreach_linked_list_node (slave_list, node)
- {
- slave_t* value = (slave_t*)(void*)(slave_list.values[node]);
- if (pthread_equal(current_thread, value->thread) == 0)
- pthread_kill(value->thread, signo);
- }
- );
+ pthread_t current_thread;
+ ssize_t node;
+ slave_t *value;
+
+ current_thread = pthread_self();
+
+ if (!pthread_equal(current_thread, master_thread))
+ pthread_kill(master_thread, signo);
+
+ with_mutex (slave_mutex,
+ foreach_linked_list_node (slave_list, node) {
+ value = (slave_t*)(void*)(slave_list.values[node]);
+ if (pthread_equal(current_thread, value->thread) == 0)
+ pthread_kill(value->thread, signo);
+ }
+ );
}
-