From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10949 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/2] Fix digit offset on resolv.conf attempts. Date: Thu, 19 Jan 2017 22:50:19 -0500 Message-ID: <20170120035019.GR1533@brightrain.aerifal.cx> References: <20170119214748.12216-1-karl.bielefeldt@adtran.com> <20170119214748.12216-3-karl.bielefeldt@adtran.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1484884249 19634 195.159.176.226 (20 Jan 2017 03:50:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2017 03:50:49 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10964-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jan 20 04:50:45 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cUQDf-0003TA-6d for gllmg-musl@m.gmane.org; Fri, 20 Jan 2017 04:50:31 +0100 Original-Received: (qmail 32092 invoked by uid 550); 20 Jan 2017 03:50:34 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32074 invoked from network); 20 Jan 2017 03:50:34 -0000 Content-Disposition: inline In-Reply-To: <20170119214748.12216-3-karl.bielefeldt@adtran.com> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10949 Archived-At: On Thu, Jan 19, 2017 at 09:49:08PM +0000, KARL BIELEFELDT wrote: > --- > src/network/resolvconf.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/network/resolvconf.c b/src/network/resolvconf.c > index 2cf1f475..4c3e4c4b 100644 > --- a/src/network/resolvconf.c > +++ b/src/network/resolvconf.c > @@ -45,8 +45,8 @@ int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz) > if (z != p) conf->ndots = x > 15 ? 15 : x; > } > p = strstr(line, "attempts:"); > - if (p && isdigit(p[6])) { > - p += 6; > + if (p && isdigit(p[9])) { > + p += 9; > unsigned long x = strtoul(p, &z, 10); > if (z != p) conf->attempts = x > 10 ? 10 : x; > } This looks correct. Would you like to be credited as commit author? (I usually ask for new first-time contributors before putting name/email in permanent repo history.) Rich