chiark / gitweb /
adns: Use proper variable for aftry array size calculation
[chiark-tcl.git] / adns / adns.c
index 6ab062b1069f9bef6d86438229025759f885e5d2..d0ee2955b94e09e26c36acde087faf81212173fd 100644 (file)
@@ -60,7 +60,7 @@
 
 /*
  * adns.c - adns binding for Tcl
- * Copyright 2006 Ian Jackson
+ * Copyright 2006-2012 Ian Jackson
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -73,9 +73,7 @@
  * General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301, USA.
+ * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #define _GNU_SOURCE
@@ -496,7 +494,7 @@ static int query_submit(Tcl_Interp *ip,
   
   if (op.reverseany || (op.sflags & oisf_reverse)) {
     const int *af;
-    for (af=aftry; af < af + sizeof(af)/sizeof(*af); af++) {
+    for (af=aftry; af < af + sizeof(aftry)/sizeof(*aftry); af++) {
       memset(&sa,0,sizeof(sa));
       sa.sa_family= *af;
       r= inet_pton(*af,domain,&sa);