library: delete some obsolete parameter checking logic

This commit removes some obsolete parameter validation
code which was needed back when certain functions were
public, called directly by users (1st/2nd generation).

Now that they're static they can be safely eliminated.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2017-11-19 00:00:00 -06:00 committed by Craig Small
parent 06be33b43e
commit d53ff45b0d
6 changed files with 0 additions and 39 deletions

View File

@ -615,11 +615,6 @@ static struct stacks_extent *diskstats_stacks_alloc (
void *v_head, *v_list;
int i;
if (this == NULL || this->items == NULL)
return NULL;
if (maxstacks < 1)
return NULL;
vect_size = sizeof(void *) * maxstacks; // size of the addr vectors |
vect_size += sizeof(void *); // plus NULL addr delimiter |
head_size = sizeof(struct diskstats_stack); // size of that head struct |

View File

@ -578,9 +578,6 @@ static int meminfo_read_failed (
unsigned long *valptr;
signed long mem_used;
if (info == NULL)
return -1;
// remember history from last time around
memcpy(&info->hist.old, &info->hist.new, sizeof(struct meminfo_data));
// clear out the soon to be 'current' values
@ -689,11 +686,6 @@ static struct stacks_extent *meminfo_stacks_alloc (
void *v_head, *v_list;
int i;
if (info == NULL || info->items == NULL)
return NULL;
if (maxstacks < 1)
return NULL;
vect_size = sizeof(void *) * maxstacks; // size of the addr vectors |
vect_size += sizeof(void *); // plus NULL addr delimiter |
head_size = sizeof(struct meminfo_stack); // size of that head struct |

View File

@ -1004,11 +1004,6 @@ static struct stacks_extent *pids_stacks_alloc (
void *v_head, *v_list;
int i;
if (info == NULL || info->items == NULL)
return NULL;
if (maxstacks < 1)
return NULL;
vect_size = sizeof(void *) * maxstacks; // size of the addr vectors |
vect_size += sizeof(void *); // plus NULL addr delimiter |
head_size = sizeof(struct pids_stack); // size of that head struct |

View File

@ -645,11 +645,6 @@ static struct stacks_extent *slabinfo_stacks_alloc (
void *v_head, *v_list;
int i;
if (this == NULL || this->items == NULL)
return NULL;
if (maxstacks < 1)
return NULL;
vect_size = sizeof(void *) * maxstacks; // size of the addr vectors |
vect_size += sizeof(void *); // plus NULL addr delimiter |
head_size = sizeof(struct slabinfo_stack); // size of that head struct |

View File

@ -555,9 +555,6 @@ static int stat_read_failed (
int i, rc, num, tot_read;
unsigned long long llnum;
if (info == NULL)
return -EINVAL;
if (!info->cpus.hist.n_alloc) {
info->cpus.hist.tics = calloc(NEWOLD_INCR, sizeof(struct hist_tic));
if (!(info->cpus.hist.tics))
@ -711,11 +708,6 @@ static struct stacks_extent *stat_stacks_alloc (
void *v_head, *v_list;
int i;
if (this == NULL || this->items == NULL)
return NULL;
if (maxstacks < 1)
return NULL;
vect_size = sizeof(void *) * maxstacks; // size of the addr vectors |
vect_size += sizeof(void *); // plus NULL addr delimiter |
head_size = sizeof(struct stat_stack); // size of that head struct |

View File

@ -976,9 +976,6 @@ static int vmstat_read_failed (
int size;
unsigned long *valptr;
if (info == NULL)
return -1;
// remember history from last time around
memcpy(&info->hist.old, &info->hist.new, sizeof(struct vmstat_data));
// clear out the soon to be 'current' values
@ -1057,11 +1054,6 @@ static struct stacks_extent *vmstat_stacks_alloc (
void *v_head, *v_list;
int i;
if (info == NULL || info->items == NULL)
return NULL;
if (maxstacks < 1)
return NULL;
vect_size = sizeof(void *) * maxstacks; // size of the addr vectors |
vect_size += sizeof(void *); // plus NULL addr delimiter |
head_size = sizeof(struct vmstat_stack); // size of that head struct |