Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261476AbVDDXGw (ORCPT ); Mon, 4 Apr 2005 19:06:52 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261473AbVDDXFM (ORCPT ); Mon, 4 Apr 2005 19:05:12 -0400 Received: from main.gmane.org ([80.91.229.2]:52716 "EHLO ciao.gmane.org") by vger.kernel.org with ESMTP id S261476AbVDDXDZ (ORCPT ); Mon, 4 Apr 2005 19:03:25 -0400 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Andres Salomon Subject: Re: [PATCH] create a kstrdup library function Date: Mon, 04 Apr 2005 17:49:13 -0400 Message-ID: References: <42519911.508@grupopie.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: cpe-24-194-62-26.nycap.res.rr.com User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 744 Lines: 18 On Mon, 04 Apr 2005 20:44:17 +0100, Paulo Marques wrote: > > Hi, > > This patch creates a new kstrdup library function and changes the > "local" implementations in several places to use this function. > > This is just a cleanup to allow reusing the strdup code, and to prevent > bugs in future duplications of strdup. > Just a minor nit; I would use a size_t in kstrdup(), instead of an int, for the len. All other functions dealing w/ the len (strlen, kmalloc, memcpy) expect a size_t. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/