Remove un-needed stack variable 'ops'.
Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
bd395ae8f6
commit
cc51a2b55e
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
@ -366,12 +366,11 @@ static int
|
|||||||
mac_policy_register(struct mac_policy_conf *mpc)
|
mac_policy_register(struct mac_policy_conf *mpc)
|
||||||
{
|
{
|
||||||
struct mac_policy_conf *tmpc;
|
struct mac_policy_conf *tmpc;
|
||||||
struct mac_policy_ops *ops;
|
|
||||||
struct mac_policy_op_entry *mpe;
|
struct mac_policy_op_entry *mpe;
|
||||||
int slot;
|
int slot;
|
||||||
|
|
||||||
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*ops), M_MACOPVEC,
|
MALLOC(mpc->mpc_ops, struct mac_policy_ops *, sizeof(*mpc->mpc_ops),
|
||||||
M_WAITOK | M_ZERO);
|
M_MACOPVEC, M_WAITOK | M_ZERO);
|
||||||
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
for (mpe = mpc->mpc_entries; mpe->mpe_constant != MAC_OP_LAST; mpe++) {
|
||||||
switch (mpe->mpe_constant) {
|
switch (mpe->mpe_constant) {
|
||||||
case MAC_OP_LAST:
|
case MAC_OP_LAST:
|
||||||
|
Loading…
Reference in New Issue
Block a user