From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Silva Subject: Re: [PATCH] Btrfs-progs use safe string manipulation functions Date: Thu, 10 Feb 2011 11:00:53 -0300 Message-ID: <1297346453.28159.17.camel@monotop> References: <1297081322.4615.10.camel@monotop> <4D53C711.3000309@nsc.liu.se> <1297344585.28159.12.camel@monotop> <1297345079.28159.14.camel@monotop> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Jeremy Sanders , linux-btrfs@vger.kernel.org To: Olaf van der Spek Return-path: In-Reply-To: List-ID: On Thu, 2011-02-10 at 14:52 +0100, Olaf van der Spek wrote: > On Thu, Feb 10, 2011 at 2:37 PM, Eduardo Silva wrote: > > string_copy seems pointless, it's kinda equivalent to strcpy. > > > > Yeah, but if we are thinking into write some wrappers let's create a couple > > for the major string manipulation used... > > A wrapper should have a benefit, your string_copy doesn't have any. It have it, take this example: char *a; a = malloc(1024); strcpy(a, NULL); at least with the wrapper you will get a notice about what's going on...