From: Li zeming <zeming@nfschina.com>
To: mcgrof@kernel.org, keescook@chromium.org, yzaikin@google.com
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Li zeming <zeming@nfschina.com>
Subject: [PATCH] proc: Remove unnecessary ‘NULL’ and '0' values
Date: Sat, 8 Oct 2022 17:30:26 +0800 [thread overview]
Message-ID: <20221008093026.4952-1-zeming@nfschina.com> (raw)
Remove unnecessary initialization assignments, which are used after the
assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
fs/proc/proc_sysctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 021e83fe831f..5fc367f0044a 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -694,7 +694,7 @@ static bool proc_sys_fill_cache(struct file *file,
struct dentry *child, *dir = file->f_path.dentry;
struct inode *inode;
struct qstr qname;
- ino_t ino = 0;
+ ino_t ino;
unsigned type = DT_UNKNOWN;
qname.name = table->procname;
@@ -1246,7 +1246,7 @@ static bool get_links(struct ctl_dir *dir,
static int insert_links(struct ctl_table_header *head)
{
struct ctl_table_set *root_set = &sysctl_table_root.default_set;
- struct ctl_dir *core_parent = NULL;
+ struct ctl_dir *core_parent;
struct ctl_table_header *links;
int err;
--
2.18.2
next reply other threads:[~2022-10-08 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-08 9:30 Li zeming [this message]
2022-10-09 15:12 ` [PATCH] proc: Remove unnecessary ‘NULL’ and '0' values Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221008093026.4952-1-zeming@nfschina.com \
--to=zeming@nfschina.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).