From 36fddb02ae4b75d5671cb859be2706e640311737 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Sat, 21 Jun 2014 20:31:15 +0200 Subject: [PATCH] Remove not used conditional. --- src/process1.c | 5 ----- src/process2.c | 4 ---- src/process3.c | 4 ---- 3 files changed, 13 deletions(-) diff --git a/src/process1.c b/src/process1.c index fbbfa40..601c356 100644 --- a/src/process1.c +++ b/src/process1.c @@ -82,7 +82,6 @@ void notify_other_processes(int signo) { void sig_handler(int signo) { fprintf(stderr, "[%s] Received %s!\n", "process1", strsignal(signo)); - if (signo == SIGUSR1) { fprintf(stderr, "[%s] > Notified!\n", "process1"); struct queue_message msg; @@ -91,10 +90,6 @@ void sig_handler(int signo) fprintf(stderr, "[%s] > Notified with value: %s!\n", "process1", strsignal(msg.signo[0])); raise(msg.signo[0]); } - else if (msgrcv(qid, &msg, sizeof(int), 1, 0) > 0) { - fprintf(stderr, "[%s] > Notified with value: %s!\n", "process1", strsignal(msg.signo[0])); - raise(msg.signo[0]); - } } else if (signo == SIGTERM) { fprintf(stderr, "[%s] > Signalling other processes..\n", "process1"); diff --git a/src/process2.c b/src/process2.c index 861919c..d498f1c 100644 --- a/src/process2.c +++ b/src/process2.c @@ -94,10 +94,6 @@ void sig_handler(int signo) fprintf(stderr, "[%s] > Notified with value: %s!\n", "process2", strsignal(msg.signo[0])); raise(msg.signo[0]); } - else if (msgrcv(qid, &msg, sizeof(int), 2, 0) > 0) { - fprintf(stderr, "[%s] > Notified with value: %s!\n", "process2", strsignal(msg.signo[0])); - raise(msg.signo[0]); - } } else if (signo == SIGTERM) { fprintf(stderr, "[%s] > Signalling other processes..\n", "process2"); diff --git a/src/process3.c b/src/process3.c index 28ecce5..6453a8f 100644 --- a/src/process3.c +++ b/src/process3.c @@ -86,10 +86,6 @@ void sig_handler(int signo) fprintf(stderr, "[%s] > Notified with value: %s!\n", "process3", strsignal(msg.signo[0])); raise(msg.signo[0]); } - else if (msgrcv(qid, &msg, sizeof(int), 3, 0) > 0) { - fprintf(stderr, "[%s] > Notified with value: %s!\n", "process3", strsignal(msg.signo[0])); - raise(msg.signo[0]); - } } else if (signo == SIGTERM) { fprintf(stderr, "[%s] > Signalling other processes..\n", "process3"); -- 2.30.2