diff --git a/proc/diskstats.c b/proc/diskstats.c index 509e015b..957ffde6 100644 --- a/proc/diskstats.c +++ b/proc/diskstats.c @@ -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 | diff --git a/proc/meminfo.c b/proc/meminfo.c index eb4cd8d5..cc8cdad0 100644 --- a/proc/meminfo.c +++ b/proc/meminfo.c @@ -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 | diff --git a/proc/pids.c b/proc/pids.c index af406b3d..0ee66b39 100644 --- a/proc/pids.c +++ b/proc/pids.c @@ -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 | diff --git a/proc/slabinfo.c b/proc/slabinfo.c index d953bee4..2bd6b568 100644 --- a/proc/slabinfo.c +++ b/proc/slabinfo.c @@ -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 | diff --git a/proc/stat.c b/proc/stat.c index 4b5b51f6..78bfb1ae 100644 --- a/proc/stat.c +++ b/proc/stat.c @@ -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 | diff --git a/proc/vmstat.c b/proc/vmstat.c index 20c0d9ba..14d79ec1 100644 --- a/proc/vmstat.c +++ b/proc/vmstat.c @@ -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 |