]> diplodocus.org Git - nmh/commitdiff
Added check of return value of write() to quash compiler warning.
authorDavid Levine <levinedl@acm.org>
Sat, 19 Mar 2016 14:15:43 +0000 (10:15 -0400)
committerDavid Levine <levinedl@acm.org>
Sat, 19 Mar 2016 14:15:43 +0000 (10:15 -0400)
uip/mhshowsbr.c

index 02b3641..a87778e 100644 (file)
@@ -1152,7 +1152,9 @@ iconv_start:
                    }
                    if (errno == EINVAL) {
                        /* middle of multi-byte sequence */
-                       write (fd, dest_buffer, outbytes_before - outbytes);
+                       if (write (fd, dest_buffer, outbytes_before - outbytes) < 0) {
+                           advise (dest, "write");
+                       }
                        fseeko (*fp, -inbytes, SEEK_CUR);
                        if (end > 0) bytes_to_read += inbytes;
                        /* advise(NULL, "convert_charset: EINVAL"); */