From patchwork Sun May 7 12:03:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9715695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9242860364 for ; Mon, 8 May 2017 01:35:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 82D7C25223 for ; Mon, 8 May 2017 01:35:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74FD526E5D; Mon, 8 May 2017 01:35:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E52225223 for ; Mon, 8 May 2017 01:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754244AbdEHBev (ORCPT ); Sun, 7 May 2017 21:34:51 -0400 Received: from mout.web.de ([212.227.15.14]:58948 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754209AbdEHBeu (ORCPT ); Sun, 7 May 2017 21:34:50 -0400 Received: from [192.168.1.3] ([77.182.161.211]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M9oaG-1dDxfK3ZVo-00B7oI; Sun, 07 May 2017 14:03:11 +0200 Subject: [PATCH 2/2] apparmorfs: Use seq_putc() in two functions From: SF Markus Elfring To: linux-security-module@vger.kernel.org, James Morris , John Johansen , "Serge E. Hallyn" Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <22def82a-4cd8-a673-f35f-012cc36fe797@users.sourceforge.net> Date: Sun, 7 May 2017 14:03:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K0:Luk9Hb8zzqX8NQ9kExz+ENDGv5puRuAx8f0uXMjaajSclxfRVbL 1yZ/zPaCwy0+BJQE4fh9dV7xOYgbkZz+eZWo5GfaNU8ks6TlSpHYxPAHS+2bK/+WiyFjmK9 +T7XSEPj58vGo9fMIuOpR3FKIYIt8WJ5U/3BB10exB14ftTGW5cEN1+pE3mggb1s9uQhsbg Ey62weihx5DHZsmM9ePBQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:926Bv4RkNQk=:0GEwH+JyOQ/a9NXLYS5mnA nDw1UkrVj4UIq8xFjYHbfhnEY4HyHpRfDGi6PzBAAWo1m0u4MDDjAumRNPfI8qcEe+dCUA6OW SK7m9VwRGnx5SU/7cmMIxs+aYiPQrSF4DQJDuwgurriGCeLl8VX3BbTE4HZ5C7wXOs9vT9BcK KmuTCkqBpY7Jxaija4hqbv9/XmZZWGOCbm/2xOM7mgrd5TpZ4l+4i2GdFvkfwqA8HcN3TwYPz d8TCFF6aA2FVfxpJdugD3YRjhfCFytsy/uGjJlEfJoMI+Q7RkF6h4WwK2BaaI4xa34xNfd9A5 10TEoHHBf8YxBN1wPesywabSxZIi/4bhpvV75P/5IrIyaBNshOLgacLfJXzkZiEJYkQIWv3hF vMezr93/TwSnI/lCoxGYsKC/swfshqX6riV1KnS3b8gxhKiAJLK6dMH8b7kv6I9iiFspUm51I BDHAGF2e8ffIZmqzAZPYSzrorOC/ShbbfvxRzPkAY3l9KSgEuEsR6pZ4h7bw+ogpa9slW5V16 04Vs6LjgESAR2M/KyFD9ut8/sG7Fgc9tO3g4dhkonSXC6F9HUndB3uFNIhIh1dPCTQkxbgRcQ qMf+4mLp1LAjUKWOHRekDxbR0F2ktHROz+0AIX+6gEKjxkUDdT0MnLJVUguKiduzpFc6euy1/ O+foqWXR/oa+UlLVgyJK5YxJgPy59Uezert28ZNKRE7yXcR2Cae/UOG+StYrx+BVfi8l++8ng 96p4sMJKDMpCDDlgXCC4KqtCCbbZLW0p7XlMVwGL8I+6b1ul9OzL0SQg2fkKtq71DhHfMK+i9 PFDnp8X Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 7 May 2017 13:50:28 +0200 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 --- security/apparmor/apparmorfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index b4d83e0bc651..41e427a4f051 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -494,7 +494,7 @@ static int aa_fs_seq_hash_show(struct seq_file *seq, void *v) if (profile->hash) { for (i = 0; i < size; i++) seq_printf(seq, "%.2x", profile->hash[i]); - seq_puts(seq, "\n"); + seq_putc(seq, '\n'); } 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) { for (i = 0; i < size; i++) seq_printf(seq, "%.2x", profile->rawdata->hash[i]); - seq_puts(seq, "\n"); + seq_putc(seq, '\n'); } aa_put_profile(profile);