---
util/log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/log.c b/util/log.c
index 7cffbc1bf89..0a8800f8d2c 100644
--- a/util/log.c
+++ b/util/log.c
@@ -593,6 +593,6 @@ ssize_t rust_fwrite(const void *ptr, size_t size, size_t
nmemb, FILE *stream)
* portable access to errno. :(
*/
int ret = fwrite(ptr, size, nmemb, stream);
- return ret < 0 ? -errno : 0;
+ return ret < 0 ? -errno : (ssize_t)(ret * size);
}
#endif
--
Signed-off-by: CMoments <[email protected]>
Cc: [email protected]
2.34.1