public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Cc: Florian Weimer <fweimer@redhat.com>,
	 Adhemerval Zanella <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH v2 2/2] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350)
Date: Fri, 10 Dec 2021 14:53:02 +0100	[thread overview]
Message-ID: <871r2klg75.fsf@igel.home> (raw)
In-Reply-To: <8538f1fc-cac4-06d5-010c-6600dd4357db@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Fri, 10 Dec 2021 10:44:58 -0300")

On Dez 10 2021, Adhemerval Zanella via Libc-alpha wrote:

> I think the indentation change made the patch hard to read, the issues is
> currently we have:
>
>   for (cmsg = CMSG_FIRSTHDR (msg);
>        cmsg != NULL;
>        cmsg = CMSG_NXTHDR (msg, cmsg))
>     {
>       if (cmsg->cmsg_level != SOL_SOCKET)
>         continue;
>       [...]
>       last = cmsg;
>     }
>
> Where we need 'last' to updated regardless of 'cmsg_level':
>
>   for (cmsg = CMSG_FIRSTHDR (msg);
>        cmsg != NULL;
>        cmsg = CMSG_NXTHDR (msg, cmsg))
>     {
>       if (cmsg->cmsg_level == SOL_SOCKET)
>         [...]
>       last = cmsg;
>     }

You could move the assignment in the loop header so that continue
continues to work.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2021-12-10 13:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 14:06 [PATCH v2 1/2] support: Add support_socket_so_timestamp_time64 Adhemerval Zanella
2021-09-29 14:06 ` [PATCH v2 2/2] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350) Adhemerval Zanella
2021-10-08 11:58   ` Adhemerval Zanella
2021-10-20 12:08     ` Adhemerval Zanella
2021-11-08 18:30       ` Adhemerval Zanella
2021-12-10 11:03         ` Adhemerval Zanella
2021-12-10 11:53   ` Florian Weimer
2021-12-10 12:47     ` Adhemerval Zanella
2021-12-10 12:56       ` Florian Weimer
2021-12-10 12:59         ` Florian Weimer
2021-12-10 13:13           ` Adhemerval Zanella
2021-12-10 13:38             ` Florian Weimer
2021-12-10 13:44               ` Adhemerval Zanella
2021-12-10 13:53                 ` Andreas Schwab [this message]
2021-12-10 13:56                   ` Adhemerval Zanella

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=871r2klg75.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=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).