From: Rafał Długołęcki Date: Sat, 21 Jun 2014 18:31:15 +0000 (+0200) Subject: Remove not used conditional. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=36fddb02ae4b75d5671cb859be2706e640311737;p=wsti_so.git Remove not used conditional. --- 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");