Kelly O'Hair wrote:
This: expected = strlen(hello); Should probably be: expected = (int)strlen(hello);
Yes, it should.
Make sense, and using snprintf would avoid the a similar issue in the future, if the message was changed to be much longer.And I would almost think that this: char msg[100]; should be: char msg[80+expected*2]; and snprintf() used rather than sprintf? But not a big deal.
Looks good otherwise.
Thanks Kelly, Tim, - I'll sort this out Monday (I'm not around Friday). -Alan.
