Daniel D. Daugherty wrote:
They are the equal at this point because the read loop has read the number of expected bytes. If the expected number of the bytes isn't received then it is caught by the inter-byte timeout. However, in terms of readability, you have a point - thanks Dan!: Shouldn't this: 173 b[expected] = '\0'; /* ensure null-terminated */ be this: 173 b[received] = '\0'; /* ensure null-terminated */ To cover the case of a short receive count...
-Alan.
