case PROCPS_SLABS_SIZE_ACTIVE:
return info->stats.active_size;
case PROCPS_SLABS_noop:
- break;
+ return 0;
+ default:
+ return -EINVAL;
}
return 0;
}
case PROCPS_SLABS_SIZE_ACTIVE:
these->result = info->stats.active_size;
break;
+ case PROCPS_SLABS_noop:
+ these->result = 0;
+ break;
default:
return -EINVAL;
}
return info->nodes[nodeid].nr_active_slabs;
case PROCPS_SLABNODE_USE:
return info->nodes[nodeid].use;
- case PROCPS_SLABNODE_NAME:
case PROCPS_SLABNODE_noop:
return 0;
+ // PROCPS_SLABNODE_NAME also invalid in this context
default:
return -EINVAL;
}
these->result.str = info->nodes[nodeid].name;
break;
case PROCPS_SLABNODE_noop:
+ these->result.num = 0;
break;
default:
return -EINVAL;
if (info == NULL || chains == NULL)
return NULL;
- if (sort < 0 || sort >= PROCPS_SLABNODE_noop)
+ if (sort < 0 || sort > PROCPS_SLABNODE_noop)
return NULL;
if (numchained > info->chained->depth)
return NULL;