From patchwork Fri Jun 13 15:32:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 359559 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3CC3214008B for ; Sat, 14 Jun 2014 01:32:47 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=HeKbvqaFdl/81SNemsxFD9a56QeduaK dOzteFbz9BSMr9ZrLAWYrMP0H3eP5M/nllXs2F+JNMvrQZ87R/prHMHMHc4clUAQ 0WORnIEbFzUvIm9zYMpipqMHcqWUEGdpTJ9CbHq6NYxvrVzYWvAXrgty51zaWfOo lBHALrUXZIv4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=kQc61j8OvL02MTreWdPwclzkdnI=; b=K9jMM eRxsjq/Se6gzj4jUce7MTuCRVIYULQbQtKHs24+0H0bA9rV5cPCgxqVAJXZ1mPgt UStV3u1V+DDyjGiSJU1EUela1zBvWbE2QOsFIZ4B58AHG4zEvbYhFTWilPt3U+zE 9OyFvqx3PyM5tpz5gLK5E9ljo7O4yLbHaqzX8w= Received: (qmail 2675 invoked by alias); 13 Jun 2014 15:32:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 2464 invoked by uid 89); 13 Jun 2014 15:32:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: Aurelien Jarno Subject: [PATCH 1/4] resolv: improve comments about nserv and nservall Date: Fri, 13 Jun 2014 17:32:10 +0200 Message-Id: <1402673533-13243-2-git-send-email-aurelien@aurel32.net> In-Reply-To: <1402673533-13243-1-git-send-email-aurelien@aurel32.net> References: <1402673533-13243-1-git-send-email-aurelien@aurel32.net> 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. 2014-06-13 Aurelien Jarno * resolv/res_init.c (__res_vinit): Improve comments about nserv and nservall. diff --git a/resolv/res_init.c b/resolv/res_init.c index ea133f8..bdec4d9 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;