lkml.org 
[lkml]   [2003]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [BK PATCH] One strdup() to rule them all
    On Mon, Aug 25, 2003 at 01:05:30PM -0400, Jeff Garzik wrote:

    > > > +char *strdup(const char *s)
    > > > +{
    > > > + char *rv = kmalloc(strlen(s)+1, GFP_KERNEL);
    > > > + if (rv)
    > > > + strcpy(rv, s);
    > > > + return rv;
    > > > +}

    > Unfortunately Linus doesn't like the strdup cleanup, so I don't see this
    > patch going in either :)

    When seeing this my objection was: it introduces something with
    a well-known name that uses GFP_KERNEL, so is not suitable everywhere -
    an invitation to mistakes.

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:48    [W:0.021 / U:59.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site