innfeed busy logging timer stats

Florian Schlichting fschlich at CIS.FU-Berlin.DE
Wed Jun 22 22:05:37 UTC 2011


On Wed, Jun 22, 2011 at 10:59:50PM +0200, Florian Schlichting wrote:
> Hi,
> 
> working on a development server, I noticed innfeed printing lots of
> useless lines to news.notice:

while poking around the issue, I happened upon a few things I don't
understand. So in the hope that you can teach me or tell me it's old
cruft that should be cleaned up...


1) What's the point of declaring and defining a function on adjacent
lines, e.g. innfeed/endpoint.c:~1396

void timerCallback (void *cd) ;
void timerCallback (void *cd)
{ 
  d_printf (1,"Callback \n") ;
}


2) In light of the confusion it might cause, is there any use in having
declaration and definition disagree about the name of the function's
parameters? (innfeed/endpoint.c:~1425, *d doesn't seem to be used? 
Similarly: prepareRead() in innfeed/endpoint.c/.h - the comments
disagree in yet another way):

void lineIsRead (EndPoint myEp, IoStatus status, Buffer *buffer, void *data);
void lineIsRead (EndPoint myEp, IoStatus status, Buffer *buffer, void *d)
{
  Buffer *writeBuffers, *readBuffers ;
  Buffer newBuff1, newBuff2 ;
  Buffer newInputBuffer ;
  char *data, *p ;
  ...


3) Would it be ok to rename "Buffer *buffer" to "Buffer *buffers" in the
above code, and "*d" to "*unused"? Preferable?


Don't get me wrong, I'm happy to provide a patch, but some of this looks
so alien to me and I'm not at all experienced with the requirements of
writing portable code that I thought I'd better ask first...

Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5557 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20110623/19e7a5a0/attachment.bin>


More information about the inn-workers mailing list