emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode build: "comparison is always true" warnings


From: Andreas Schwab
Subject: Re: unicode build: "comparison is always true" warnings
Date: Fri, 23 Nov 2007 19:07:46 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux)

address@hidden (Mark A. Hershberger) writes:

>        while (1)
>       {
>         /* Create the lock file, but not under the lock file name.  */
>         /* Give up if cannot do that.  */
> +#ifndef HAVE_MKSTEMP
>         desc = open (tempname, O_WRONLY | O_CREAT | O_EXCL, 0666);
> +#else
> +          desc = mkstemp (tempname);
> +#endif

That won't work since mkstemp modifies tempname in place, but can be
called more than once here (the second call will return with EINVAL).

(The use of mktemp is not really bad here anyway.)

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]