Browse Source

apparmorfs: Use seq_putc() in two functions

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>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Markus Elfring 8 years ago
parent
commit
47dbd1cdbb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      security/apparmor/apparmorfs.c

+ 2 - 2
security/apparmor/apparmorfs.c

@@ -494,7 +494,7 @@ static int aa_fs_seq_hash_show(struct seq_file *seq, void *v)
 	if (profile->hash) {
 	if (profile->hash) {
 		for (i = 0; i < size; i++)
 		for (i = 0; i < size; i++)
 			seq_printf(seq, "%.2x", profile->hash[i]);
 			seq_printf(seq, "%.2x", profile->hash[i]);
-		seq_puts(seq, "\n");
+		seq_putc(seq, '\n');
 	}
 	}
 	aa_put_profile(profile);
 	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) {
 	if (profile->rawdata->hash) {
 		for (i = 0; i < size; i++)
 		for (i = 0; i < size; i++)
 			seq_printf(seq, "%.2x", profile->rawdata->hash[i]);
 			seq_printf(seq, "%.2x", profile->rawdata->hash[i]);
-		seq_puts(seq, "\n");
+		seq_putc(seq, '\n');
 	}
 	}
 	aa_put_profile(profile);
 	aa_put_profile(profile);