Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/net put the state back after it is used.



details:   https://anonhg.NetBSD.org/src/rev/e08cebb5dc1d
branches:  trunk
changeset: 341220:e08cebb5dc1d
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Oct 26 19:41:19 2015 +0000

description:
put the state back after it is used.

diffstat:

 lib/libc/net/getnetnamadr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 33e132855be2 -r e08cebb5dc1d lib/libc/net/getnetnamadr.c
--- a/lib/libc/net/getnetnamadr.c       Mon Oct 26 19:28:53 2015 +0000
+++ b/lib/libc/net/getnetnamadr.c       Mon Oct 26 19:41:19 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getnetnamadr.c,v 1.43 2015/10/26 19:28:53 christos Exp $       */
+/*     $NetBSD: getnetnamadr.c,v 1.44 2015/10/26 19:41:19 christos Exp $       */
 
 /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
  *     Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -43,7 +43,7 @@
 static char sccsid_[] = "from getnetnamadr.c   1.4 (Coimbra) 93/06/03";
 static char rcsid[] = "Id: getnetnamadr.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: getnetnamadr.c,v 1.43 2015/10/26 19:28:53 christos Exp $");
+__RCSID("$NetBSD: getnetnamadr.c,v 1.44 2015/10/26 19:41:19 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -365,8 +365,8 @@
                __res_put_state(res);
                return NS_NOTFOUND;
        }
+       np = getnetanswer(res, buf, anslen, BYADDR);
        __res_put_state(res);
-       np = getnetanswer(res, buf, anslen, BYADDR);
        free(buf);
        if (np) {
                /* maybe net should be unsigned? */
@@ -477,8 +477,8 @@
                __res_put_state(res);
                return NS_NOTFOUND;
        }
+       np = getnetanswer(res, buf, anslen, BYNAME);
        __res_put_state(res);
-       np = getnetanswer(res, buf, anslen, BYNAME);
        free(buf);
 
        if (np != NULL) {



Home | Main Index | Thread Index | Old Index