Re: [PATCH] Btrfs-progs use safe string manipulation functions
From: Olaf van der Spek <hidden>
Date: 2011-02-10 14:05:23
On Thu, Feb 10, 2011 at 3:00 PM, Eduardo Silva <eduardo.silva@oracle.co= m> wrote:
On Thu, 2011-02-10 at 14:52 +0100, Olaf van der Spek wrote:quoted
On Thu, Feb 10, 2011 at 2:37 PM, Eduardo Silva <eduardo.silva@oracle=
=2Ecom> wrote:
quoted
quoted
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
quoted
quoted
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: =C2=A0 =C2=A0 =C2=A0 =C2=A0char *a; =C2=A0 =C2=A0 =C2=A0 =C2=A0a =3D malloc(1024); =C2=A0 =C2=A0 =C2=A0 =C2=A0strcpy(a, NULL); at least with the wrapper you will get a notice about what's going on...
The debugger shows you what's going on without wrapper. --=20 Olaf -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html