From: John Johansen <john.johansen@canonical.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
linux-security-module@vger.kernel.org,
James Morris <james.l.morris@oracle.com>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] apparmorfs: Use seq_putc() in two functions
Date: Sun, 7 May 2017 05:31:17 -0700 [thread overview]
Message-ID: <d48192cc-5b4d-8b09-1955-9f100fcf1e23@canonical.com> (raw)
In-Reply-To: <22def82a-4cd8-a673-f35f-012cc36fe797@users.sourceforge.net>
On 05/07/2017 05:03 AM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sun, 7 May 2017 13:50:28 +0200
>
> Two single characters (line breaks) should be put into a sequence.
> Thus use the corresponding function "seq_putc".
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: John Johansen <john.johansen@canonical.com>
I'll pull it into my tree for my next push
> ---
> security/apparmor/apparmorfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index b4d83e0bc651..41e427a4f051 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -494,7 +494,7 @@ static int aa_fs_seq_hash_show(struct seq_file *seq, void *v)
> if (profile->hash) {
> for (i = 0; i < size; i++)
> seq_printf(seq, "%.2x", profile->hash[i]);
> - seq_puts(seq, "\n");
> + seq_putc(seq, '\n');
> }
> aa_put_profile(profile);
>
> @@ -602,7 +602,7 @@ static int aa_fs_seq_raw_hash_show(struct seq_file *seq, void *v)
> if (profile->rawdata->hash) {
> for (i = 0; i < size; i++)
> seq_printf(seq, "%.2x", profile->rawdata->hash[i]);
> - seq_puts(seq, "\n");
> + seq_putc(seq, '\n');
> }
> aa_put_profile(profile);
>
>
prev parent reply other threads:[~2017-05-08 0:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 12:01 [PATCH 0/2] apparmorfs: Fine-tuning for three function implementations SF Markus Elfring
2017-05-07 12:02 ` [PATCH 1/2] apparmorfs: Combine two function calls into one in aa_fs_seq_raw_abi_show() SF Markus Elfring
2017-05-07 12:31 ` John Johansen
2017-05-07 12:03 ` [PATCH 2/2] apparmorfs: Use seq_putc() in two functions SF Markus Elfring
2017-05-07 12:31 ` John Johansen [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=d48192cc-5b4d-8b09-1955-9f100fcf1e23@canonical.com \
--to=john.johansen@canonical.com \
--cc=elfring@users.sourceforge.net \
--cc=james.l.morris@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.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
all inboxes | Powered by JetHome®