projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9436a5
)
user_namespace: remove unnecessary NULL values from kbuf
author
Li zeming
<zeming@nfschina.com>
Mon, 15 Jan 2024 06:25:19 +0000
(14:25 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:52 +0000
(15:38 -0800)
kbuf is assigned first, so it does not need to initialize the assignment.
Link:
https://lkml.kernel.org/r/20240115062519.31298-1-zeming@nfschina.com
Signed-off-by: Li zeming <zeming@nfschina.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/user_namespace.c
patch
|
blob
|
history
diff --git
a/kernel/user_namespace.c
b/kernel/user_namespace.c
index ce4d99df5f0eb4621ef32455eadfc57be314edee..0b0b95418b16a7aa69078c6db3f59f7a15f388c2 100644
(file)
--- a/
kernel/user_namespace.c
+++ b/
kernel/user_namespace.c
@@
-931,7
+931,7
@@
static ssize_t map_write(struct file *file, const char __user *buf,
struct uid_gid_map new_map;
unsigned idx;
struct uid_gid_extent extent;
- char *kbuf
= NULL
, *pos, *next_line;
+ char *kbuf, *pos, *next_line;
ssize_t ret;
/* Only allow < page size writes at the beginning of the file */