Dann Corbit dijo: 

> > Alvaro Herrera <[EMAIL PROTECTED]> writes:
> > > !                 ret=(char *)malloc(sizeof(char)*strlen(t));
> > > !                 strncpy(ret, t, strlen(t));
> > >
> > > !                 ret=(char *)malloc(sizeof(char)*(strlen(t)+1));
> > > !                 strncpy(ret, t, strlen(t)+1);
> > 
> > What have you got against strdup() ?
> 
> The strdup() function is non-standard, and need not exist in a C
> implementation.

Actually I have nothing against strdup(), and I think I have seen it in
Pg source.  I just didn't think about it ;-)

Feel free to change it if you want...

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
One man's impedance mismatch is another man's layer of abstraction.
(Lincoln Yeoh)


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to