util/log: Fix rust_fwrite() to return bytes written
PATCH 1/1 util/log: Fix rust_fwrite() to return bytes written
--- util/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
util/log.c +1 -1
@@ -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
Signature · 3 lines
Signed-off-by: CMoments <[email protected]> Cc: [email protected] 2.34.1