aboutsummaryrefslogtreecommitdiff
path: root/src/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream.c')
-rw-r--r--src/stream.c5
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)
{