[Mesa-dev] [PATCH 7/7] egl/wayland: remove dead code
Emil Velikov
emil.l.velikov at gmail.com
Fri Jul 10 12:47:29 PDT 2015
On 10/07/15 19:22, Matt Turner wrote:
> On Fri, Jul 10, 2015 at 10:49 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> The macro HAVE_MKOSTEMP was never defined.
>>
>> Cc: Axel Davy <axel.davy at ens.fr>
>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>> ---
>> src/egl/drivers/dri2/platform_wayland.c | 6 ------
>> 1 file changed, 6 deletions(-)
>>
>> diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
>> index 9005eb7..bdccee3 100644
>> --- a/src/egl/drivers/dri2/platform_wayland.c
>> +++ b/src/egl/drivers/dri2/platform_wayland.c
>> @@ -1255,17 +1255,11 @@ create_tmpfile_cloexec(char *tmpname)
>> {
>> int fd;
>>
>> -#ifdef HAVE_MKOSTEMP
>> - fd = mkostemp(tmpname, O_CLOEXEC);
>> - if (fd >= 0)
>> - unlink(tmpname);
>
> It is indeed dead-code, but wouldn't you rather simply add
>
> AC_CHECK_FUNC([mkostemp], AC_DEFINE(HAVE_MKOSTEMP, 1, [Use mkostemp(3)]))
>
> to configure.ac and bring it to life?
>
I just wanted to remove some code (sob, sob). But seriously, adding the
configure check will do the job, if you prefer we'll use it.
Thanks for having a look!
Emil
More information about the mesa-dev
mailing list