From owner-freebsd-current Tue Mar 20 1:28:11 2001 Delivered-To: freebsd-current@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id D4C6837B720 for ; Tue, 20 Mar 2001 01:28:08 -0800 (PST) (envelope-from ache@nagual.pp.ru) Received: (from ache@localhost) by nagual.pp.ru (8.11.3/8.11.3) id f2K9RRS94393; Tue, 20 Mar 2001 12:27:27 +0300 (MSK) (envelope-from ache) Date: Tue, 20 Mar 2001 12:27:25 +0300 From: "Andrey A. Chernov" To: Alfred Perlstein Cc: thinker , freebsd-current@FreeBSD.ORG Subject: Re: patch /bin/ls again, for mb supporting. Message-ID: <20010320122725.A94139@nagual.pp.ru> References: <20010320164901.A14424@hell.branda.to> <20010320011246.O29888@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010320011246.O29888@fw.wintelcom.net>; from bright@wintelcom.net on Tue, Mar 20, 2001 at 01:12:46AM -0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Mar 20, 2001 at 01:12:46 -0800, Alfred Perlstein wrote: > > + p += sz; > > + while(sz--) > > + *ri++ = '?'; > > Why didn't you use strlcpy/memcpy as suggested? Choosen method is right. Calling *cpy for just one byte in 99% cases is overhead. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message