summaryrefslogtreecommitdiff
path: root/contrib/bind9/lib/bind/nameser/ns_parse.c
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2006-01-14 10:13:50 +0000
committerDoug Barton <dougb@FreeBSD.org>2006-01-14 10:13:50 +0000
commit41ecb87b06112f5c5ec1c81deb735501a6e8133e (patch)
tree11bb34523fd3b455d9fe361e25c35b83173e7000 /contrib/bind9/lib/bind/nameser/ns_parse.c
parent958288d0218912ac8c29b001f2992a68ae2180c6 (diff)
Notes
Diffstat (limited to 'contrib/bind9/lib/bind/nameser/ns_parse.c')
-rw-r--r--contrib/bind9/lib/bind/nameser/ns_parse.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/bind9/lib/bind/nameser/ns_parse.c b/contrib/bind9/lib/bind/nameser/ns_parse.c
index 34ebd3de8481..19a6f51b2db1 100644
--- a/contrib/bind9/lib/bind/nameser/ns_parse.c
+++ b/contrib/bind9/lib/bind/nameser/ns_parse.c
@@ -16,7 +16,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.3.2.1.4.1 2004/03/09 08:33:44 marka Exp $";
+static const char rcsid[] = "$Id: ns_parse.c,v 1.3.2.1.4.3 2005/10/11 00:48:16 marka Exp $";
#endif
/* Import. */
@@ -40,7 +40,12 @@ static void setsection(ns_msg *msg, ns_sect sect);
/* Macros. */
+#ifndef SOLARIS2
#define RETERR(err) do { errno = (err); return (-1); } while (0)
+#else
+#define RETERR(err) \
+ do { errno = (err); if (errno == errno) return (-1); } while (0)
+#endif
/* Public. */
@@ -135,7 +140,8 @@ ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
int tmp;
/* Make section right. */
- if ((tmp = section) < 0 || section >= ns_s_max)
+ tmp = section;
+ if (tmp < 0 || section >= ns_s_max)
RETERR(ENODEV);
if (section != handle->_sect)
setsection(handle, section);