diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2017-02-12 23:50:54 +0200 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2017-02-12 23:50:54 +0200 |
| commit | b8ab5e2d6b3f34f4c56b906130ba63173df8f2d0 (patch) | |
| tree | 24e1c88bb75c2e439ce95c312bb54c9867ac531a /src/stream.c | |
| parent | c742eeb2a4192f05b5e594830fafea116243b431 (diff) | |
| download | mqtt-b8ab5e2d6b3f34f4c56b906130ba63173df8f2d0.tar.gz mqtt-b8ab5e2d6b3f34f4c56b906130ba63173df8f2d0.zip | |
Fixes to make code to almost compile on -std=c89 setting
Diffstat (limited to 'src/stream.c')
| -rw-r--r-- | src/stream.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stream.c b/src/stream.c index 5296501..97a8a2d 100644 --- a/src/stream.c +++ b/src/stream.c @@ -6,7 +6,7 @@ #include <assert.h> #include <errno.h> -// htons, ntohs +/* htons, ntohs */ #include <arpa/inet.h> #define STREAM_CHECK_OP(stream, op) \ @@ -27,8 +27,9 @@ int StreamClose(Stream *stream) int64_t StreamRead(void *ptr, size_t size, Stream *stream) { + int64_t rv; STREAM_CHECK_OP(stream, read); - int64_t rv = stream->ops->read(ptr, size, stream); + rv = stream->ops->read(ptr, size, stream); #if defined(STREAM_HEXDUMP_READ) if (rv >= 0) { |
