@@ -670,15 +670,16 @@ store_iobuf_local(int iofd, const IoBuffer *iobuf, const uint8_t *buf,
670670 }
671671
672672 /* Write to specified I/O log file. */
673- if (!iolog_write (& closure -> iolog_files [iofd ], data .data , data .len , & errstr )) {
673+ if (iolog_write (& closure -> iolog_files [iofd ], data .data , data .len ,
674+ & errstr ) == -1 ) {
674675 sudo_warnx (U_ ("%s/%s: %s" ), evlog -> iolog_path , iolog_fd_to_name (iofd ),
675676 errstr );
676677 goto bad ;
677678 }
678679
679680 /* Write timing data. */
680- if (! iolog_write (& closure -> iolog_files [IOFD_TIMING ], tbuf ,
681- (size_t )len , & errstr )) {
681+ if (iolog_write (& closure -> iolog_files [IOFD_TIMING ], tbuf ,
682+ (size_t )len , & errstr ) == -1 ) {
682683 sudo_warnx (U_ ("%s/%s: %s" ), evlog -> iolog_path ,
683684 iolog_fd_to_name (IOFD_TIMING ), errstr );
684685 goto bad ;
@@ -714,8 +715,8 @@ store_winsize_local(const ChangeWindowSize *msg, const uint8_t *buf,
714715 }
715716
716717 /* Write timing data. */
717- if (! iolog_write (& closure -> iolog_files [IOFD_TIMING ], tbuf ,
718- (size_t )len , & errstr )) {
718+ if (iolog_write (& closure -> iolog_files [IOFD_TIMING ], tbuf ,
719+ (size_t )len , & errstr ) == -1 ) {
719720 sudo_warnx (U_ ("%s/%s: %s" ), closure -> evlog -> iolog_path ,
720721 iolog_fd_to_name (IOFD_TIMING ), errstr );
721722 goto bad ;
@@ -749,8 +750,8 @@ store_suspend_local(const CommandSuspend *msg, const uint8_t *buf,
749750 }
750751
751752 /* Write timing data. */
752- if (! iolog_write (& closure -> iolog_files [IOFD_TIMING ], tbuf ,
753- (size_t )len , & errstr )) {
753+ if (iolog_write (& closure -> iolog_files [IOFD_TIMING ], tbuf ,
754+ (size_t )len , & errstr ) == -1 ) {
754755 sudo_warnx (U_ ("%s/%s: %s" ), closure -> evlog -> iolog_path ,
755756 iolog_fd_to_name (IOFD_TIMING ), errstr );
756757 goto bad ;
0 commit comments