All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] check: Add LTP-005 null termination check on test.tags
Date: Tue, 07 Dec 2021 08:22:27 +0000	[thread overview]
Message-ID: <875ys0ddln.fsf@suse.de> (raw)
In-Reply-To: <Ya4xA4DTIP1DpHW4@yuki>

Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> This does not explicitly check for zero at the end of an array. For
>> one thing the zero is implicit when one writes '{}'. We just get an
>> empty expression list. When one writes '{NULL, 0}', we get an implicit
>
> I would vote for dropping the part that checks for implicit cats so that
> we unify all code on {} for sentinels. I guess that all we would have to
> do is to drop the loop and only check if the list is empty.

Yes, indeed, it probably simplifies things a lot more than is
immediately obvious as well. I will reroll.

>
> Other than that the code looks good to me:
>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>


-- 
Thank you,
Richard.

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2021-12-07  8:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01 16:24 [LTP] [PATCH 1/2] doc: Add LTP-005: Array must be sentinel terminated Richard Palethorpe via ltp
2021-12-01 16:24 ` [LTP] [PATCH 2/2] check: Add LTP-005 null termination check on test.tags Richard Palethorpe via ltp
2021-12-01 19:10   ` Petr Vorel
2021-12-06 15:49   ` Cyril Hrubis
2021-12-07  8:22     ` Richard Palethorpe [this message]
2021-12-01 18:21 ` [LTP] [PATCH 1/2] doc: Add LTP-005: Array must be sentinel terminated Petr Vorel
2021-12-06 15:22 ` Cyril Hrubis

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=875ys0ddln.fsf@suse.de \
    --to=rpalethorpe@suse.de \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.