Messages in this thread | | | Date | Mon, 25 Aug 2003 19:49:18 +0200 | From | Andries Brouwer <> | Subject | Re: [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/
| |