1
0
mirror of https://github.com/simh/simh.git synced 2026-01-31 13:53:10 +00:00

Compiler suggested cleanup

This commit is contained in:
Mark Pizzolato
2012-12-15 07:56:42 -08:00
parent c046a29cba
commit 0450a9b430
7 changed files with 60 additions and 71 deletions

View File

@@ -1246,11 +1246,12 @@ int written;
written = write (port, (void *) buffer, (size_t) count); /* write the buffer to the serial port */
if (written == -1)
if (written == -1) {
if (errno != EAGAIN) /* unexpected error? */
sim_error_serial ("write", errno); /* report it */
else
written = 0; /* not an error, but nothing written */
}
return (int32) written; /* return number of characters written */
}