summaryrefslogtreecommitdiff
path: root/src/shared/pty.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-09 14:23:02 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 14:59:51 +0200
commit1f6b411372076426c0faf0bb350437fb4d82931f (patch)
tree32a52b3e2bb04731cc857b738e989531a4144516 /src/shared/pty.c
parent94c156cd452424ea59931920df2454d9da7cb774 (diff)
tree-wide: update empty-if coccinelle script to cover empty-while and more
Let's also clean up single-line while and for blocks.
Diffstat (limited to 'src/shared/pty.c')
-rw-r--r--src/shared/pty.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/pty.c b/src/shared/pty.c
index a87b3ce6f0..35d9ff5f4d 100644
--- a/src/shared/pty.c
+++ b/src/shared/pty.c
@@ -311,9 +311,8 @@ static int pty_dispatch_read(Pty *pty) {
continue;
return (errno == EAGAIN) ? 0 : -errno;
- } else if (len == 0) {
+ } else if (len == 0)
continue;
- }
/* set terminating zero for debugging safety */
pty->in_buf[len] = 0;
@@ -356,9 +355,8 @@ static int pty_dispatch_write(Pty *pty) {
continue;
return (errno == EAGAIN) ? 1 : -errno;
- } else if (len == 0) {
+ } else if (len == 0)
continue;
- }
ring_pull(&pty->out_buf, (size_t)len);
}