]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
errno2result now reports caller when unable to convert errno
authorMark Andrews <marka@isc.org>
Fri, 2 Dec 2011 07:16:30 +0000 (07:16 +0000)
committerMark Andrews <marka@isc.org>
Fri, 2 Dec 2011 07:16:30 +0000 (07:16 +0000)
lib/isc/unix/errno2result.c
lib/isc/unix/errno2result.h

index 606c5600c2f8073b061e1e5881cc635165469a24..88966208dbf849794b8fa53dd6aef3d2c5f9eb90 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: errno2result.c,v 1.17 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: errno2result.c,v 1.17.558.1 2011/12/02 07:16:29 marka Exp $ */
 
 /*! \file */
 
@@ -34,7 +34,7 @@
  * not already there.
  */
 isc_result_t
-isc__errno2result(int posixerrno) {
+isc___errno2result(int posixerrno, const char *file, unsigned int line) {
        char strbuf[ISC_STRERRORSIZE];
 
        switch (posixerrno) {
@@ -108,8 +108,7 @@ isc__errno2result(int posixerrno) {
                return (ISC_R_CONNREFUSED);
        default:
                isc__strerror(posixerrno, strbuf, sizeof(strbuf));
-               UNEXPECTED_ERROR(__FILE__, __LINE__,
-                                "unable to convert errno "
+               UNEXPECTED_ERROR(file, line, "unable to convert errno "
                                 "to isc_result: %d: %s",
                                 posixerrno, strbuf);
                /*
index b5b658d500cdd7bc959aa7a9ca2d58518f7c4388..f39c3fb7048cf1c1abfd92928b217a320dbb39e9 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: errno2result.h,v 1.12 2007/06/19 23:47:18 tbox Exp $ */
+/* $Id: errno2result.h,v 1.12.558.1 2011/12/02 07:16:30 marka Exp $ */
 
 #ifndef UNIX_ERRNO2RESULT_H
 #define UNIX_ERRNO2RESULT_H 1
 
 ISC_LANG_BEGINDECLS
 
+#define isc__errno2result(x) isc___errno2result(x, __FILE__, __LINE__)
+
 isc_result_t
-isc__errno2result(int posixerrno);
+isc___errno2result(int posixerrno, const char *file, unsigned int line);
 
 ISC_LANG_ENDDECLS