linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Alexander Potapenko <glider@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	kasan-dev@googlegroups.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>
Subject: Re: [PATCH v1 1/1] kasan: Replace strreplace() with strchrnul()
Date: Thu, 29 Jun 2023 12:22:40 +0300	[thread overview]
Message-ID: <ZJ1NYFtTJ/9CZ0qU@smile.fi.intel.com> (raw)
In-Reply-To: <CAG_fn=WjLDsnUPKFwF8XJiyqYP6M+Q9ZqUweRPzPT3dW0i_E+A@mail.gmail.com>

On Wed, Jun 28, 2023 at 05:39:26PM +0200, Alexander Potapenko wrote:
> On Wed, Jun 28, 2023 at 5:34 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:

...

> >                 /* Strip line number; without filename it's not very helpful. */
> > -               strreplace(token, ':', '\0');
> > +               p[strchrnul(token, ':') - token] = '\0';
> 
> Why not just
>    *(strchrnul(token, ':')) = '\0';
> ?

I don't like Pythonish style in the C. But if you insist, I can update it.

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2023-06-29  9:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28 15:33 Andy Shevchenko
2023-06-28 15:39 ` Alexander Potapenko
2023-06-29  9:22   ` Andy Shevchenko [this message]
2023-06-29 14:32 ` David Laight
2023-06-29 14:41   ` 'Andy Shevchenko'
2023-07-03 10:50 ` Andy Shevchenko
2023-07-19  5:36 ` kernel test robot

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=ZJ1NYFtTJ/9CZ0qU@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.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