public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>,
	Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH] posix: Fix -Warray-bounds instances building timer_create [BZ #26687]
Date: Tue, 6 Oct 2020 10:57:46 -0300	[thread overview]
Message-ID: <2ab8d7b8-6bd4-0239-af1c-feb339495709@linaro.org> (raw)
In-Reply-To: <878scjtx01.fsf@oldenburg2.str.redhat.com>



On 06/10/2020 08:27, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> diff --git a/sysdeps/unix/sysv/linux/timer_create.c b/sysdeps/unix/sysv/linux/timer_create.c
>> index 370c99a517..69b4e667fa 100644
>> --- a/sysdeps/unix/sysv/linux/timer_create.c
>> +++ b/sysdeps/unix/sysv/linux/timer_create.c
>> @@ -149,27 +122,24 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
>>  
>>  	/* Create the timer.  */
>>  	int res;
>> +	res = INTERNAL_SYSCALL_CALL (timer_create, syscall_clockid, &sev,
>> +				     &newp->ktimerid);
>> +	if (res == -1)
>>  	  {
>> +	    free (newp);
>> +	    __set_errno (INTERNAL_SYSCALL_ERRNO (res));
>> +	    return -1;
>>  	  }
> 
> This does not look like a correct use of INTERNAL_SYSCALL_CALL to me.
> Don't you have to use INTERNAL_SYSCALL_ERROR_P here?

It should indeed, I have changed to use INTERNAL_SYSCALL_ERROR_P instead
of using comparing to '-1'.  Are you ok with this patch with this change?
 

  reply	other threads:[~2020-10-06 13:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 21:12 Adhemerval Zanella
2020-10-06  8:13 ` Florian Weimer
2020-10-06  8:21   ` Florian Weimer
2020-10-06 14:00     ` Adhemerval Zanella
2020-10-06 14:13       ` Florian Weimer
2020-10-06 14:24         ` Adhemerval Zanella
2020-10-06 11:27 ` Florian Weimer
2020-10-06 13:57   ` Adhemerval Zanella [this message]
2020-10-06 14:14     ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ab8d7b8-6bd4-0239-af1c-feb339495709@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).