From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.161]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id p6VBVex8009736 for ; Sun, 31 Jul 2011 07:31:41 -0400 (EDT) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQv0cW+St/nW/avgusCdvwXOZ/NA7x/bslxlDPy6G726REW7piU2JIqNTwRM= X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de ([2001:6f8:13f0:0:5e26:aff:fe1e:99a9]) by smtp.strato.de (jimi mo46) (RZmta 26.2) with (DHE-RSA-AES128-SHA encrypted) ESMTPA id D04c9cn6VAbubd for ; Sun, 31 Jul 2011 13:31:24 +0200 (MEST) Received: by britannica.bec.de (sSMTP sendmail emulation); Sun, 31 Jul 2011 13:31:23 +0200 Date: Sun, 31 Jul 2011 13:31:23 +0200 From: Joerg Sonnenberger To: source@mdocml.bsd.lv Subject: Re: mdocml: Regression fixes after merging 1.11.3 to OpenBSD (rev. Message-ID: <20110731113123.GB2434@britannica.bec.de> Mail-Followup-To: source@mdocml.bsd.lv References: <201107311124.p6VBOdOn017859@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107311124.p6VBOdOn017859@krisdoz.my.domain> User-Agent: Mutt/1.5.21 (2010-09-15) On Sun, Jul 31, 2011 at 07:24:39AM -0400, schwarze@mdocml.bsd.lv wrote: > diff -Lchars.c -Lchars.c -u -p -r1.49 -r1.50 > --- chars.c > +++ chars.c > @@ -113,7 +113,7 @@ mchars_num2char(const char *p, size_t sz > > if ((i = mandoc_strntoi(p, sz, 10)) < 0) > return('\0'); > - return(isprint(i) ? i : '\0'); > + return(i > 0 && i < 256 && isprint(i) ? i : '\0'); > } > > int Any reason why this doesn't use i>=0? That would allow the compiler to merge both tests by using a bitmask... Joerg -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv