summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/ioev.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2016-11-24 12:58:28 +0000
committerEric Faurot <eric@cvs.openbsd.org>2016-11-24 12:58:28 +0000
commitc1cdfba7d663481a9cb76c667dbbb9d18a818d3a (patch)
treebdb41036cf4d0032d178e61f9ad06f52a62fd427 /usr.sbin/smtpd/ioev.c
parent9f507f27c91ce88cd5351423ced0d59d1089eb1f (diff)
add an io_error() accessor to avoid dereferencing the io struct directly.
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/ioev.c')
-rw-r--r--usr.sbin/smtpd/ioev.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/ioev.c b/usr.sbin/smtpd/ioev.c
index 146c7f18b86..93d8e78611a 100644
--- a/usr.sbin/smtpd/ioev.c
+++ b/usr.sbin/smtpd/ioev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioev.c,v 1.32 2016/11/24 07:57:48 eric Exp $ */
+/* $OpenBSD: ioev.c,v 1.33 2016/11/24 12:58:27 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -363,6 +363,12 @@ io_set_write(struct io *io)
io_reload(io);
}
+const char *
+io_error(struct io *io)
+{
+ return io->error;
+}
+
/*
* Buffered output functions
*/