]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fix fwrite return value check in doqclient
authorYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Tue, 1 Oct 2024 12:02:08 +0000 (14:02 +0200)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Tue, 1 Oct 2024 12:02:08 +0000 (14:02 +0200)
testcode/doqclient.c

index fe71aeb74476f975470b2db7c37dde3949f2c32e..4ba4f8c4098a5ed771568960002f38caa190eee8 100644 (file)
@@ -1190,7 +1190,7 @@ early_data_write_transport(struct doq_client_data* data)
                perror(data->transport_file);
                return;
        }
-       if(fwrite(buf, 1, len, out) != 1) {
+       if(fwrite(buf, 1, len, out) != (size_t)len) {
                log_err("fwrite %s failed: %s", data->transport_file,
                        strerror(errno));
        }