From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-security-module@vger.kernel.org
Subject: [PATCH 1/3] ima: Use seq_putc() in ima_ascii_measurements_show()
Date: Sun, 7 May 2017 15:41:14 +0200 [thread overview]
Message-ID: <6d0e528b-dc78-7927-1820-a6eaf5c7cb02@users.sourceforge.net> (raw)
In-Reply-To: <416e6b01-7abb-d894-3bd6-d8bda05ed6b2@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 7 May 2017 14:45:01 +0200
Two single characters 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>
---
security/integrity/ima/ima_fs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
index ca303e5d2b94..732b5cd27042 100644
--- a/security/integrity/ima/ima_fs.c
+++ b/security/integrity/ima/ima_fs.c
@@ -242,14 +242,14 @@ static int ima_ascii_measurements_show(struct seq_file *m, void *v)
/* 4th: template specific data */
for (i = 0; i < e->template_desc->num_fields; i++) {
- seq_puts(m, " ");
+ seq_putc(m, ' ');
if (e->template_data[i].len == 0)
continue;
e->template_desc->fields[i]->field_show(m, IMA_SHOW_ASCII,
&e->template_data[i]);
}
- seq_puts(m, "\n");
+ seq_putc(m, '\n');
return 0;
}
--
2.12.2
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-05-07 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-07 13:40 [PATCH 0/3] IMA: Fine-tuning for three function implementations SF Markus Elfring
2017-05-07 13:41 ` SF Markus Elfring [this message]
2017-05-07 13:42 ` [PATCH 2/3] ima: Combine two function calls into one in ima_policy_show() SF Markus Elfring
2017-05-07 13:43 ` [PATCH 3/3] ima: Replace nine seq_puts() calls by seq_putc() SF Markus Elfring
2017-05-08 14:26 ` [PATCH 0/3] IMA: Fine-tuning for three function implementations Mimi Zohar
2017-05-08 15:26 ` SF Markus Elfring
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=6d0e528b-dc78-7927-1820-a6eaf5c7cb02@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=linux-security-module@vger.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;
as well as URLs for NNTP newsgroup(s).