diff options
author | maniac <fgma@users.noreply.github.com> | 2019-11-23 22:22:28 +0100 |
---|---|---|
committer | maniac <fgma@users.noreply.github.com> | 2019-11-23 22:22:28 +0100 |
commit | efee99067f9929111bfd1409a8a683978f80b792 (patch) | |
tree | 071ba1c9f40f31b93b4b3e0cb85270262853ff3e | |
parent | workaround for musl's implementation of fflush() in mail.lmtp (diff) | |
download | OpenSMTPD-efee99067f9929111bfd1409a8a683978f80b792.tar.xz OpenSMTPD-efee99067f9929111bfd1409a8a683978f80b792.zip |
coding style cleanups
-rw-r--r-- | smtpd/mail.lmtp.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/smtpd/mail.lmtp.c b/smtpd/mail.lmtp.c index 87a6fb48..563f10e3 100644 --- a/smtpd/mail.lmtp.c +++ b/smtpd/mail.lmtp.c @@ -219,26 +219,14 @@ lmtp_engine(int fd_read, struct session *session) ssize_t linelen; enum phase phase = PHASE_BANNER; - fd_write = dup(fd_read); - - if (fd_write == -1){ + if ((fd_write = dup(fd_read)) == -1) err(EX_TEMPFAIL, "dup"); - return; - } - - file_read = fdopen(fd_read, "r"); - if (!file_read){ + if (!(file_read = fdopen(fd_read, "r"))) err(EX_TEMPFAIL, "fdopen"); - return; - } - - file_write = fdopen(fd_write, "w"); - if (!file_write){ + if (!(file_write = fdopen(fd_write, "w"))) err(EX_TEMPFAIL, "fdopen"); - return; - } do { fflush(file_write); |