> -----Original Message----- > From: Tom Lane [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 29, 2002 9:07 PM > To: Alvaro Herrera > Cc: Gordon Runkle; [EMAIL PROTECTED] > Subject: Re: [HACKERS] [7.3devl] Using PGPASSWORDFILE with > psql requires -U > > > 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. ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])