Sorry for my too late response...
In article <[EMAIL PROTECTED]> (at Thu, 27 Jan 2000 17:45:23 +0900),
[EMAIL PROTECTED] says:
> A question was raised about freeaddrinfo(NULL).
> Is it permitted, or should we just SEGV?
> My personal preference is to SEGV. I can find no reason to allow it
> except NRL compatibilty.
I think freeaddrinfo(NULL) and freehostent(NULL) should also be
allowed as free(NULL) is allowed; to avoid confusion.
If the returned buffer is bulkly malloc()ed, freeaddrinfo()
will be:
void freeaddrinfo(struct addrinfo *ai){
free(ai);
}
Similar question: How about getifaddrs()?
The getifaddrs(NULL) included in KAME kit doesn't raise an error, does it?
Why don't you have it raise a SEGV signal as you do in freeaddrinfo()?
void freeifaddrs(struct ifaddrs *ifp){
if (!ifp) raise(SIG_SEGV);
free(ifp);
}
I think freeifaddrs(NULL) should be allowed, too; again, to avoid confusion.
--
Hideaki YOSHIFUJI <[EMAIL PROTECTED]>
Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515 1323 1806 A96F 5700 6B25
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page: http://playground.sun.com/ipng
FTP archive: ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------