summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@fastmail.co.uk>2017-07-08 23:21:11 +0100
committerRichard Ipsum <richardipsum@fastmail.co.uk>2017-07-08 23:46:27 +0100
commitf185b33aac5e37319b5ee9828be5a009eca7cbf0 (patch)
tree29e43ecda74255bf05c95b917ca6ca99306ad163
parent8d8b213c4c91efa388560037b40b19d8c2b59549 (diff)
downloadsupple-f185b33aac5e37319b5ee9828be5a009eca7cbf0.tar.gz
Squash compiler warning of ignored ret value
-rw-r--r--src/wrapper.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wrapper.c b/src/wrapper.c
index b27651c..9cc90cd 100644
--- a/src/wrapper.c
+++ b/src/wrapper.c
@@ -81,11 +81,16 @@ main(int argc, char **argv)
success = lua_pcall(L, 1, 0, 0);
- if (success != 0) {
+ if (success != 0) {
size_t l;
+ ssize_t n;
const char *s = lua_tolstring(L, -1, &l);
- write(2, s, l);
- }
+
+ n = write(2, s, l);
+ if (n == -1) {
+ success = 1;
+ }
+ }
lua_close(L);