Jacek Caban wrote:
Like the comment says, it is not thread-safe. I don't think it is wise to delibrately introduce race conditions like this and it tends to cause problems with applications that rely heavily on multiple threads (such as iTunes). It would be better to use the thread-safe inet_ntop (which also has the bonus of supporting IPv6) or the ws2_32 version of inet_ntoa.