Hi, * Denver Gingerich <[EMAIL PROTECTED]> [2008-06-17 16:03]: > On Tue, Jun 17, 2008 at 7:40 AM, Santiago Vila <[EMAIL PROTECTED]> wrote: [...] > > - tmpnam (side->temp_name); > > - side->temp_file = fopen (side->temp_name, "w"); > > + strcpy(side->temp_name, "/tmp/wdiff.XXXXXX"); > > + fd = mkstemp(side->temp_name); > > + side->temp_file = fdopen(fd, "w"); > > if (side->temp_file == NULL) > > error (EXIT_OTHER_REASON, errno, side->temp_name); > > This patch is acceptable. I do have some cautionary comments, though.
Please also check the return value of mkstemp, it may fail. [...] > Secondly, the manpage for mkstemp has the following note: "Don't use > this function, use tmpfile(3) instead.". What manpage do you have there? At least this is not the case in the posix manuals I have. Cheers Nico -- Nico Golde - http://www.ngolde.de - [EMAIL PROTECTED] - GPG: 0x73647CFF For security reasons, all text in this mail is double-rot13 encrypted.
pgpfIDwh9BlIp.pgp
Description: PGP signature

