|
@@ -1712,11 +1712,11 @@ int security_get_bools(int *len, char ***names, int **values)
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- *names = (char**)kcalloc(*len, sizeof(char*), GFP_ATOMIC);
|
|
|
|
|
|
+ *names = kcalloc(*len, sizeof(char*), GFP_ATOMIC);
|
|
if (!*names)
|
|
if (!*names)
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
- *values = (int*)kcalloc(*len, sizeof(int), GFP_ATOMIC);
|
|
|
|
|
|
+ *values = kcalloc(*len, sizeof(int), GFP_ATOMIC);
|
|
if (!*values)
|
|
if (!*values)
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
@@ -1724,7 +1724,7 @@ int security_get_bools(int *len, char ***names, int **values)
|
|
size_t name_len;
|
|
size_t name_len;
|
|
(*values)[i] = policydb.bool_val_to_struct[i]->state;
|
|
(*values)[i] = policydb.bool_val_to_struct[i]->state;
|
|
name_len = strlen(policydb.p_bool_val_to_name[i]) + 1;
|
|
name_len = strlen(policydb.p_bool_val_to_name[i]) + 1;
|
|
- (*names)[i] = (char*)kmalloc(sizeof(char) * name_len, GFP_ATOMIC);
|
|
|
|
|
|
+ (*names)[i] = kmalloc(sizeof(char) * name_len, GFP_ATOMIC);
|
|
if (!(*names)[i])
|
|
if (!(*names)[i])
|
|
goto err;
|
|
goto err;
|
|
strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len);
|
|
strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len);
|