Skip to content

Commit

Permalink
selinuxfs: Use seq_puts() in sel_avc_stats_seq_show()
Browse files Browse the repository at this point in the history
A string which did not contain data format specifications should be put
into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
Markus Elfring authored and Paul Moore committed Mar 29, 2017
1 parent 8ee4586 commit 710a064
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions security/selinux/selinuxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,10 +1456,10 @@ static int sel_avc_stats_seq_show(struct seq_file *seq, void *v)
{
struct avc_cache_stats *st = v;

if (v == SEQ_START_TOKEN)
seq_printf(seq, "lookups hits misses allocations reclaims "
"frees\n");
else {
if (v == SEQ_START_TOKEN) {
seq_puts(seq,
"lookups hits misses allocations reclaims frees\n");
} else {
unsigned int lookups = st->lookups;
unsigned int misses = st->misses;
unsigned int hits = lookups - misses;
Expand Down

0 comments on commit 710a064

Please sign in to comment.