Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-5304: do not memset after LIBCFS_ALLOC
[fs/lustre-release.git]
/
libcfs
/
include
/
libcfs
/
params_tree.h
diff --git
a/libcfs/include/libcfs/params_tree.h
b/libcfs/include/libcfs/params_tree.h
index
238408c
..
0bfbdf7
100644
(file)
--- a/
libcfs/include/libcfs/params_tree.h
+++ b/
libcfs/include/libcfs/params_tree.h
@@
-179,13
+179,14
@@
seq_open(struct file *file, const struct seq_operations *fops)
{
struct seq_file *p = file->param_private;
- if (
!p
) {
+ if (
p == NULL
) {
LIBCFS_ALLOC(p, sizeof(*p));
- if (
!p
)
+ if (
p == NULL
)
return -ENOMEM;
file->param_private = p;
+ } else {
+ memset(p, 0, sizeof(*p));
}
- memset(p, 0, sizeof(*p));
p->op = fops;
return 0;
}