From 1f6b411372076426c0faf0bb350437fb4d82931f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 9 Sep 2015 14:23:02 +0200 Subject: tree-wide: update empty-if coccinelle script to cover empty-while and more Let's also clean up single-line while and for blocks. --- src/shared/pty.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/shared') 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); } -- cgit v1.2.3-54-g00ecf