about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2015-01-06 08:33:43 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-01-06 09:00:20 -0800
commit5fe55e9c654be9055d5ee22dce749c0ee8a3bb75 (patch)
tree8bcd0abc2c3e19bf6717e3b2c0d7271fbd64ca15
parent9300797ee93422a87f443d5ba7e1411167e7a837 (diff)
downloadglibc-5fe55e9c654be9055d5ee22dce749c0ee8a3bb75.tar.gz
glibc-5fe55e9c654be9055d5ee22dce749c0ee8a3bb75.tar.xz
glibc-5fe55e9c654be9055d5ee22dce749c0ee8a3bb75.zip
resolv: improve comments about nserv and nservall
The current comments concerning nserv and nservall are not really clear
and lead to confusion when reviewing an already complex code. Improve
them, there real meaning have been confirmed by a code analysis.

	* resolv/res_init.c (__res_vinit): Improve comments about nserv
	and nservall.
-rw-r--r--ChangeLog5
-rw-r--r--resolv/res_init.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fe5e58455..1204575be1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-06  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* resolv/res_init.c (__res_vinit): Improve comments about nserv
+	and nservall.
+
 2015-01-06  Ondřej Bílka  <neleai@seznam.cz>
 
 	* sysdeps/unix/sysv/linux/check_pf.c (make_request):
diff --git a/resolv/res_init.c b/resolv/res_init.c
index d492a08aee..4c170be684 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -153,9 +153,9 @@ __res_vinit(res_state statp, int preinit) {
 	char *cp, **pp;
 	int n;
 	char buf[BUFSIZ];
-	int nserv = 0;    /* number of nameserver records read from file */
+	int nserv = 0;    /* number of IPv4 nameservers read from file */
 #ifdef _LIBC
-	int nservall = 0; /* number of NS records read, nserv IPv4 only */
+	int nservall = 0; /* number of (IPv4 + IPV6) nameservers read from file */
 #endif
 	int haveenv = 0;
 	int havesearch = 0;