public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] check: Add LTP-005 null termination check on test.tags
Date: Mon, 6 Dec 2021 16:49:23 +0100	[thread overview]
Message-ID: <Ya4xA4DTIP1DpHW4@yuki> (raw)
In-Reply-To: <20211201162401.12725-2-rpalethorpe@suse.com>

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.

Other than that the code looks good to me:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

  parent reply	other threads:[~2021-12-06 15:48 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 [this message]
2021-12-07  8:22     ` Richard Palethorpe
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=Ya4xA4DTIP1DpHW4@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.com \
    /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