hmurray at megapathdsl.net
Sun Nov 22 05:02:44 UTC 2015
esr at thyrsus.com said:
> Sadly, I don't know of any good tutorials on this. It is a swamp full of
> razor blades for even very experienced C programmers. If you have a
> particular exporession you want me to analyze I might be able to say
> something useful.
The old code was:
req = req_buf;
req_end = req_buf + sizeof(req_buf);
#define REQ_ROOM (req_end - req)
chars = strlen(buf);
if (REQ_ROOM - chars < 1)
The new code is:
if (REQ_ROOM <= chars)
The old if didn't work after chars changed to size_t.
These are my opinions. I hate spam.
More information about the devel