Whamcloud - gitweb
LU-4423 lnet: remove memset(0) after LIBCFS_ALLOC
[fs/lustre-release.git] / lnet / selftest / console.c
index af050a1..f951c17 100644 (file)
@@ -205,9 +205,6 @@ lstcon_group_alloc(char *name, lstcon_group_t **grpp)
         if (grp == NULL)
                 return -ENOMEM;
 
-        memset(grp, 0, offsetof(lstcon_group_t,
-                                grp_ndl_hash[LST_NODE_HASHSIZE]));
-
         grp->grp_ref = 1;
        if (name != NULL) {
                if (strlen(name) > sizeof(grp->grp_name)-1) {
@@ -817,8 +814,6 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t __user *gents_p,
                 return -ENOMEM;
         }
 
-       memset(gentp, 0, sizeof(lstcon_ndlist_ent_t));
-
        list_for_each_entry(ndl, &grp->grp_ndl_list, ndl_link)
                 LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp);
 
@@ -979,8 +974,6 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up,
         if (entp == NULL)
                 return -ENOMEM;
 
-        memset(entp, 0, sizeof(lstcon_test_batch_ent_t));
-
         if (test == NULL) {
                 entp->u.tbe_batch.bae_ntest = bat->bat_ntest;
                 entp->u.tbe_batch.bae_state = bat->bat_state;
@@ -1328,7 +1321,6 @@ lstcon_test_add(char *batch_name, int type, int loop,
                goto out;
        }
 
-       memset(test, 0, offsetof(lstcon_test_t, tes_param[paramlen]));
        test->tes_hdr.tsb_id    = batch->bat_hdr.tsb_id;
        test->tes_batch         = batch;
        test->tes_type          = type;
@@ -1805,8 +1797,6 @@ lstcon_session_info(lst_sid_t __user *sid_up, int __user *key_up,
         if (entp == NULL)
                 return -ENOMEM;
 
-        memset(entp, 0, sizeof(*entp));
-
        list_for_each_entry(ndl, &console_session.ses_ndl_list, ndl_link)
                LST_NODE_STATE_COUNTER(ndl->ndl_node, entp);