From 76c1a05f2b7389b9ca01d8af125382fc0a646faa Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 11 Jul 2011 03:24:54 +0200 Subject: some errno and error_message() cleanup * errno was evaluated even though it was in an undefined state * error_message()s written by cmd_writebak() were overwritten by cmd_write() --- tecbuf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tecbuf.c') diff --git a/tecbuf.c b/tecbuf.c index b20966a..8df8b09 100644 --- a/tecbuf.c +++ b/tecbuf.c @@ -1015,6 +1015,7 @@ int status; if(bcount == sizeof(iobuf)){ status = write(chan,iobuf,sizeof(iobuf)); if(status != sizeof(iobuf)){ + /* NOTE: status *should* be -1, errno *should* be set */ return(FAIL); }/* End IF */ bcount = 0; @@ -1037,6 +1038,7 @@ int status; if(bcount > 0){ status = write(chan,iobuf,(unsigned)bcount); if(status != bcount){ + /* NOTE: status *should* be -1, errno *should* be set */ return(FAIL); }/* End IF */ }/* End IF */ -- cgit v1.2.3