From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5xna-0000Gk-Rc for qemu-devel@nongnu.org; Tue, 20 Sep 2011 06:43:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5xna-0002ow-04 for qemu-devel@nongnu.org; Tue, 20 Sep 2011 06:43:34 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:42470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5xnZ-0002or-NH for qemu-devel@nongnu.org; Tue, 20 Sep 2011 06:43:33 -0400 Received: by wyh22 with SMTP id 22so402662wyh.4 for ; Tue, 20 Sep 2011 03:43:32 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E786E52.5040505@redhat.com> Date: Tue, 20 Sep 2011 12:43:30 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1316443309-23843-1-git-send-email-mdroth@linux.vnet.ibm.com> <1316443309-23843-8-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1316443309-23843-8-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 7/8] cutil: add strocat(), to concat a string to an offset in another List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: aliguori@linux.vnet.ibm.com, qemu-devel@nongnu.org On 09/19/2011 04:41 PM, Michael Roth wrote: > +/* concat first 'offset' chars in 'dest' with 'src' */ > +char *strocat(char *buf, const char *src, int offset) > +{ > + memcpy(&buf[offset], src, strlen(src)); > + buf[offset+strlen(src)] = '\0'; This is just strcpy(&buf[offset], src); > + return buf; > +} Paolo