Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637165
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/3] ima: Use seq_putc() in ima_ascii_measurements_show() |
| Date | 2017-05-08 01:50 +0200 |
| Message-ID | <tEE65-4ny-9@gated-at.bofh.it> (permalink) |
| References | <tEDWp-4jj-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] IMA: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 01:40 +0200
[PATCH 3/3] ima: Replace nine seq_puts() calls by seq_putc() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 01:40 +0200
[PATCH 2/3] ima: Combine two function calls into one in ima_policy_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 01:40 +0200
[PATCH 1/3] ima: Use seq_putc() in ima_ascii_measurements_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 01:50 +0200
Re: [PATCH 0/3] IMA: Fine-tuning for three function implementations Mimi Zohar <zohar@linux.vnet.ibm.com> - 2017-05-08 16:30 +0200
Re: IMA: Fine-tuning for three function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 17:30 +0200
csiph-web