Bug, well not really but could be?

Paul Procacci <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
Gents,

Forgive me in advance as my C programming skills are still maturing.  I
found a discrepancy for the len argument being passed to accept.  On my
machine (FBSD), I have the following definition of accept:

int accept(int s, struct sockaddr * restrict addr, socklen_t * restrict
addrlen);

Here is where I get all fuzzy and warm due to my lack of understanding.

socklen_t is defined as "an unsigned opaque integral type of length of
at least 32 bits" yet this call is passing a signed int (see
socket_accept.c).  I would have thought we would be passing an 'unsigned
int'.

I'm curious if this was simply an oversight (meaning it should be
unsigned int), or if there was a real reason behind it.  I question it
only because my compiler is yelling and screaming.

Thanks,
Paul

This message may contain confidential or privileged information.  If you are not the intended recipient, please advise us immediately and delete this message.  See http://www.datapipe.com/emaildisclaimer.aspx for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.