library: re-enable <pids) dealloc_stacks, found a need
The above function had been disabled via '#if 0' so as to prevent a compiler warning. But it really should be called by that 'procps_pids_read_shut' function rather than it duplicating/reinventing the same logic itself. Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
657ac2e0c7
commit
c9388ed512
@ -1057,7 +1057,6 @@ static struct stacks_extent *alloc_stacks (
|
|||||||
} // end: alloc_stacks
|
} // end: alloc_stacks
|
||||||
|
|
||||||
|
|
||||||
#if 0 // --------------------------- not (currently) needed
|
|
||||||
static int dealloc_stacks (
|
static int dealloc_stacks (
|
||||||
struct procps_pidsinfo *info,
|
struct procps_pidsinfo *info,
|
||||||
struct stacks_extent **these)
|
struct stacks_extent **these)
|
||||||
@ -1075,7 +1074,6 @@ static int dealloc_stacks (
|
|||||||
*these = NULL;
|
*these = NULL;
|
||||||
return rc;
|
return rc;
|
||||||
} // end: dealloc_stacks
|
} // end: dealloc_stacks
|
||||||
#endif // -------------------------- not (currently) needed
|
|
||||||
|
|
||||||
|
|
||||||
static int fetch_helper (
|
static int fetch_helper (
|
||||||
@ -1254,14 +1252,10 @@ PROCPS_EXPORT int procps_pids_read_open (
|
|||||||
PROCPS_EXPORT int procps_pids_read_shut (
|
PROCPS_EXPORT int procps_pids_read_shut (
|
||||||
struct procps_pidsinfo *info)
|
struct procps_pidsinfo *info)
|
||||||
{
|
{
|
||||||
int rc;
|
|
||||||
|
|
||||||
if (info == NULL || ! READS_BEGUN)
|
if (info == NULL || ! READS_BEGUN)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
oldproc_close(info);
|
oldproc_close(info);
|
||||||
rc = extent_free(info, info->read);
|
return dealloc_stacks(info, &info->read);
|
||||||
info->read = NULL;
|
|
||||||
return rc;
|
|
||||||
} // end: procps_pids_read_shut
|
} // end: procps_pids_read_shut
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user