summaryrefslogtreecommitdiffstats
path: root/security/apparmor/label.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2019-07-02 20:27:32 +0200
committerJohn Johansen <john.johansen@canonical.com>2020-01-19 00:35:23 +0100
commit278de07ef84a4356a3b166dc17751abc03abca67 (patch)
treef4fd0552b4be6101c94fd657af2ad58240ac1767 /security/apparmor/label.c
parentLinux 5.5-rc5 (diff)
downloadlinux-278de07ef84a4356a3b166dc17751abc03abca67.tar.xz
linux-278de07ef84a4356a3b166dc17751abc03abca67.zip
apparmor: Replace two seq_printf() calls by seq_puts() in aa_label_seq_xprint()
Two strings which did not contain a data format specification 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: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/label.c')
-rw-r--r--security/apparmor/label.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/label.c b/security/apparmor/label.c
index 470693239e64..bb34094421c4 100644
--- a/security/apparmor/label.c
+++ b/security/apparmor/label.c
@@ -1749,13 +1749,13 @@ void aa_label_seq_xprint(struct seq_file *f, struct aa_ns *ns,
AA_DEBUG("label print error");
return;
}
- seq_printf(f, "%s", str);
+ seq_puts(f, str);
kfree(str);
} else if (display_mode(ns, label, flags))
seq_printf(f, "%s (%s)", label->hname,
label_modename(ns, label, flags));
else
- seq_printf(f, "%s", label->hname);
+ seq_puts(f, label->hname);
}
void aa_label_xprintk(struct aa_ns *ns, struct aa_label *label, int flags,