commit db5d0306b37a3199decd3cec6be9ca5f6dd26c0b from: Sven M. Hallberg date: Sun Jan 08 12:00:29 2023 UTC style and comments in read_result commit - 04ec7d6ac385e91e23549b7d55c3fdc0065a054c commit + db5d0306b37a3199decd3cec6be9ca5f6dd26c0b blob - 633383123efa3f7e46635d23d1a4376d279dbee5 blob + 366e62a8ce4ef1b762839feafb40c1cbe1961ce2 --- mc5000.c +++ mc5000.c @@ -576,7 +576,7 @@ read_result(int mcu) struct message m; for (;;) { - if (read_message(&m) == -1) /* junk */ + if (read_message(&m) == -1) /* received junk */ continue; if (m.type == REPORT) { @@ -588,10 +588,10 @@ read_result(int mcu) fprintf(stderr, "unexpected response from MCU #%d\n", m.source); else - break; /* success */ + break; /* got what we wanted */ } - assert (m.type == RESULT); - assert (m.source == mcu); + assert(m.type == RESULT); + assert(m.source == mcu); return m.result; }