http://bugzilla.spamassassin.org/show_bug.cgi?id=3506





------- Additional Comments From [EMAIL PROTECTED]  2004-07-27 13:03 -------
I tried to post a comment before leaving for my bus commute, but it didn't go
through. I said something like:

 ---
I feel responsible for fixing this. Maybe I can get a journal article out if it,
"Fixing compiler warnings with insufficient coffee considered harmful". I'll
look at the code more carefully during my bus commute in a few minutes and come
up with a patch.
 ---

What I found was: There really isn't a good reason to use ssize_t. The functions
that the value ultimately comes from are recv and SSL_read, both of which are
declared as returning int. ssize_t is not defined on all platforms and is not
checked for in the configure script, so using it requires some messy
preprocessor conditionalization. Since both recv and SSL_read return int, that's
what fd_timeout_read and ssl_timeout_read should be declared as returning,
bytesread should be declared int, the typedefs of ssize_t in utils.c and utils.h
can be removed, and for good measure the test for bytesread<=0 should come
before the buf[len]=='\n' test in case there is a timeout when the buffer
happens to start with a newline, and *lenp should be initialized to 0 so it
cannot have a bogus value on return from a timeout even if the calling code
should ignore it in that case.

And yes, we should try again on EINTR.

I'll put together the patch in the next few minutes.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to