]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compiler warning fix
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 6 Jul 2016 20:41:18 +0000 (23:41 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 11 Jul 2016 14:38:44 +0000 (17:38 +0300)
src/doveadm/doveadm-zlib.c

index fe6f19be71f1473e38d628870b1dd0a0838eb501..3094400d243a5b3aed7de93b0cfdb03f41f86c69 100644 (file)
@@ -70,7 +70,8 @@ static void cmd_dump_imapzlib(int argc ATTR_UNUSED, char *argv[])
        i_stream_unref(&input);
 
        while (i_stream_read_data(input2, &data, &size, 0) != -1) {
-               fwrite(data, 1, size, stdout);
+               if (fwrite(data, 1, size, stdout) != size)
+                       break;
                i_stream_skip(input2, size);
        }
        i_stream_unref(&input2);