From: Steven Rostedt <rostedt@goodmis.org>
To: Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, trivial@kernel.org
Subject: Re: [PATCH] tracing: prefer strlcpy to strncpy
Date: Mon, 4 Jun 2018 14:06:52 -0400 [thread overview]
Message-ID: <20180604140652.34f28df7@gandalf.local.home> (raw)
In-Reply-To: <1527573818-29712-1-git-send-email-nick.desaulniers@gmail.com>
On Mon, 28 May 2018 23:03:38 -0700
Nick Desaulniers <nick.desaulniers@gmail.com> wrote:
> Fixes a stringop-truncation warning from gcc-8.
>
> Signed-off-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-- Steve
> ---
> kernel/trace/trace_events_hist.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> index b9061ed..b53a6c0 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -393,7 +393,7 @@ static void hist_err_event(char *str, char *system, char *event, char *var)
> else if (system)
> snprintf(err, MAX_FILTER_STR_VAL, "%s.%s", system, event);
> else
> - strncpy(err, var, MAX_FILTER_STR_VAL);
> + strlcpy(err, var, MAX_FILTER_STR_VAL);
>
> hist_err(str, err);
> }
prev parent reply other threads:[~2018-06-04 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 6:03 Nick Desaulniers
2018-05-30 1:55 ` Nick Desaulniers
2018-06-04 18:10 ` Steven Rostedt
2018-06-04 18:06 ` Steven Rostedt [this message]
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=20180604140652.34f28df7@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nick.desaulniers@gmail.com \
--cc=trivial@kernel.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
all inboxes | Powered by JetHome®