Re: warns fixes for bin/date

Mike Barcroft <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Organization The FreeBSD Project
Message-ID <[email protected]>
Giorgos Keramidas <[email protected]> writes:
> The type of a variable passed to getsockopt and recvfrom in
> src/bin/date/netdate.c is `int'.  Changing it to `socklen_t'
> fixes the only warnings that this utility has when compiling
> with WARNS=6.
> 
> How does this look?

I think you might get additional warnings on LP64 system like alpha
and sparc64, since `size_t' != `socklen_t' on those systems.  It's
probably okay to explicitly cast the return values from sizeof() to
`socklen_t' for all the uses of `length'.

Best regards,
Mike Barcroft

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
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.