aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip6.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-01-18 20:22:04 +0000
committerYang Tse <yangsita@gmail.com>2010-01-18 20:22:04 +0000
commitccfe279117f197d2b3d0bb17bc754209024836a2 (patch)
treeccfd266b8c3b77c37da1515f49dd22b21a8a43bc /lib/hostip6.c
parent5b5ff41ef1ddd70864c55bdf47edd3f9c942cdc8 (diff)
Constantine Sapuntzakis enhancements to make memory tracking log file writing
of messages atomic, on systems where an fwrite of a memory buffer is atomic.
Diffstat (limited to 'lib/hostip6.c')
-rw-r--r--lib/hostip6.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/hostip6.c b/lib/hostip6.c
index a5bc55ce0..518133365 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -112,17 +112,13 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa,
host, hostlen,
serv, servlen,
flags);
- if(0 == res) {
+ if(0 == res)
/* success */
- if(logfile)
- fprintf(logfile, "GETNAME %s:%d getnameinfo()\n",
- source, line);
- }
- else {
- if(logfile)
- fprintf(logfile, "GETNAME %s:%d getnameinfo() failed = %d\n",
- source, line, res);
- }
+ curl_memlog("GETNAME %s:%d getnameinfo()\n",
+ source, line);
+ else
+ curl_memlog("GETNAME %s:%d getnameinfo() failed = %d\n",
+ source, line, res);
return res;
}
#endif /* defined(CURLDEBUG) && defined(HAVE_GETNAMEINFO) */