summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c
index 6f35252e3d..34b6bc81f9 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -28,6 +28,7 @@
#endif
#include <fcntl.h>
#include <strings.h>
+#include <assert.h>
#include "config.h"
@@ -326,6 +327,7 @@ int stream_write_buffer(stream_t *s, unsigned char *buf, int len) {
if(rd < 0)
return -1;
s->pos += rd;
+ assert(rd == len && "stream_write_buffer(): unexpected short write");
return rd;
}