aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-05-06 03:45:59 -0400
committerDavid Teigland <teigland@redhat.com>2017-08-07 12:23:09 -0400
commitd12ad1a96434793a58d2b9bfef8eb54787034206 (patch)
tree9b77f863847957097cccc425fac492ad6761dff2 /fs/dlm
parent2f48e06102b2541c0957a223c923dc8036112142 (diff)
dlm: Improve a size determination in two functions
Replace the specification of two data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/member.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c
index 92c601a11e38..3e565034ff2e 100644
--- a/fs/dlm/member.c
+++ b/fs/dlm/member.c
@@ -318,7 +318,7 @@ static int dlm_add_member(struct dlm_ls *ls, struct dlm_config_node *node)
318 struct dlm_member *memb; 318 struct dlm_member *memb;
319 int error; 319 int error;
320 320
321 memb = kzalloc(sizeof(struct dlm_member), GFP_NOFS); 321 memb = kzalloc(sizeof(*memb), GFP_NOFS);
322 if (!memb) 322 if (!memb)
323 return -ENOMEM; 323 return -ENOMEM;
324 324
@@ -674,7 +674,7 @@ int dlm_ls_start(struct dlm_ls *ls)
674 struct dlm_config_node *nodes; 674 struct dlm_config_node *nodes;
675 int error, count; 675 int error, count;
676 676
677 rv = kzalloc(sizeof(struct dlm_recover), GFP_NOFS); 677 rv = kzalloc(sizeof(*rv), GFP_NOFS);
678 if (!rv) 678 if (!rv)
679 return -ENOMEM; 679 return -ENOMEM;
680 680