Piotr Caban (@piotr) commented about dlls/msvcrt/file.c:
size_t CDECL _fwrite_nolock(const void *ptr, size_t size, size_t nmemb, FILE* file) { size_t wrcnt=size * nmemb; - int written = 0; + int written = 0, bufsize; if (size == 0) return 0;
+ bufsize = !(file->_flag & (MSVCRT__NOBUF | _IOMYBUF | MSVCRT__USERBUF)) && !msvcrt_alloc_buffer(file) ? 1 : file->_bufsiz; It's currently the longest line in the file - could you please split it?
Thinking about it more, maybe following code is easier to understand: ```c if(!(file->_flag & (MSVCRT__NOBUF | _IOMYBUF | MSVCRT__USERBUF))) msvcrt_alloc_buffer(file); bufsize = file->_bufsiz > 0 ? file->_bufsiz : 1; ``` What do you think? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10199#note_130741