aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-clipboard.c6
-rw-r--r--src/mds-echo.c12
-rw-r--r--src/mds-kkbd.c6
-rw-r--r--src/mds-vt.c10
4 files changed, 11 insertions, 23 deletions
diff --git a/src/mds-clipboard.c b/src/mds-clipboard.c
index d7a943f..55798a6 100644
--- a/src/mds-clipboard.c
+++ b/src/mds-clipboard.c
@@ -351,10 +351,8 @@ int master_loop(void)
}
if (r = mds_message_read(&received, socket_fd), r == 0)
- {
- if (r = handle_message(), r == 0)
- continue;
- }
+ if (r = handle_message(), r == 0)
+ continue;
if (r == -2)
{
diff --git a/src/mds-echo.c b/src/mds-echo.c
index b6df862..31e8b86 100644
--- a/src/mds-echo.c
+++ b/src/mds-echo.c
@@ -218,17 +218,13 @@ int __attribute__((const)) reexec_failure_recover(void)
*/
int master_loop(void)
{
- int rc = 1;
+ int rc = 1, r;
while (!reexecing && !terminating)
{
- int r = mds_message_read(&received, socket_fd);
- if (r == 0)
- {
- r = echo_message();
- if (r == 0)
- continue;
- }
+ if (r = mds_message_read(&received, socket_fd), r == 0)
+ if (r = echo_message(), r == 0)
+ continue;
if (r == -2)
{
diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c
index f5c44b8..86290cd 100644
--- a/src/mds-kkbd.c
+++ b/src/mds-kkbd.c
@@ -432,10 +432,8 @@ int master_loop(void)
}
if (r = mds_message_read(&received, socket_fd), r == 0)
- {
- if (r = handle_message(), r == 0)
- continue;
- }
+ if (r = handle_message(), r == 0)
+ continue;
if (r == -2)
{
diff --git a/src/mds-vt.c b/src/mds-vt.c
index dd30b46..aa82d34 100644
--- a/src/mds-vt.c
+++ b/src/mds-vt.c
@@ -374,13 +374,9 @@ int master_loop(void)
/* FIXME */
}
- r = mds_message_read(&received, socket_fd);
- if (r == 0)
- {
- r = 0; /* FIXME */
- if (r == 0)
- continue;
- }
+ if (r = mds_message_read(&received, socket_fd), r == 0)
+ if (r = 0, r == 0) /* FIXME */
+ continue;
if (r == -2)
{