From: Olaf van der Spek <olafvdspek@gmail.com>
To: Eduardo Silva <eduardo.silva@oracle.com>
Cc: Jeremy Sanders <jeremy@jeremysanders.net>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs-progs use safe string manipulation functions
Date: Thu, 10 Feb 2011 15:05:23 +0100 [thread overview]
Message-ID: <AANLkTimab4hgbh40YZ-wd2BHc7-SgxZN20q2GJt37RjO@mail.gmail.com> (raw)
In-Reply-To: <1297346453.28159.17.camel@monotop>
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:
>> On Thu, Feb 10, 2011 at 2:37 PM, Eduardo Silva <eduardo.silva@oracle=
=2Ecom> 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:
>
> =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
next prev parent reply other threads:[~2011-02-10 14:05 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 12:22 [PATCH] Btrfs-progs use safe string manipulation functions Eduardo Silva
2011-02-07 18:17 ` Goffredo Baroncelli
2011-02-10 11:08 ` Thomas Bellman
2011-02-10 11:21 ` Olaf van der Spek
2011-02-10 11:37 ` Jeremy Sanders
2011-02-10 11:39 ` Olaf van der Spek
2011-02-10 13:29 ` Eduardo Silva
2011-02-10 13:34 ` Olaf van der Spek
2011-02-10 13:41 ` Eduardo Silva
[not found] ` <1297345079.28159.14.camel@monotop>
2011-02-10 13:52 ` Olaf van der Spek
2011-02-10 14:00 ` Eduardo Silva
2011-02-10 14:05 ` Olaf van der Spek [this message]
2011-02-10 18:39 ` Goffredo Baroncelli
2011-02-11 12:41 ` Lars Wirzenius
2011-02-10 11:54 ` Lars Wirzenius
2011-02-10 12:27 ` Olaf van der Spek
2011-02-10 12:41 ` Thomas Bellman
2011-02-10 15:17 ` Olaf van der Spek
2011-02-10 11:49 ` Eduardo Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimab4hgbh40YZ-wd2BHc7-SgxZN20q2GJt37RjO@mail.gmail.com \
--to=olafvdspek@gmail.com \
--cc=eduardo.silva@oracle.com \
--cc=jeremy@jeremysanders.net \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).