From fabb3860947881b572204705d55eb8f59fa2e25a Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 1 Jan 2025 19:06:54 -0800 Subject: libvmon: public vmon_proc_monitor() shouldn't accept a parent The public callers of vmon_proc_monitor() shouldn't ever be passing a non-NULL parent as that's a pretty intimate and messy internal aspect of libvmon. So let's remove that altogether from the public function for monitoring a process, and turn existing one supporting parents into a libvmon-private function. Trivial cleanup, there's so much more needed in libvmon since it's the epitome of an organically evolved crusty thing. --- src/charts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/charts.c') diff --git a/src/charts.c b/src/charts.c index cc42469..53d067c 100644 --- a/src/charts.c +++ b/src/charts.c @@ -1173,7 +1173,7 @@ vwm_chart_t * vwm_chart_create(vwm_charts_t *charts, int pid, int width, int hei /* add the client process to the monitoring hierarchy */ /* XXX note libvmon here maintains a unique callback for each unique callback+xwin pair, so multi-window processes work */ - chart->proc = vmon_proc_monitor(&charts->vmon, NULL, pid, VMON_WANT_PROC_INHERIT, (void (*)(vmon_t *, void *, vmon_proc_t *, void *))proc_sample_callback, chart); + chart->proc = vmon_proc_monitor(&charts->vmon, pid, VMON_WANT_PROC_INHERIT, (void (*)(vmon_t *, void *, vmon_proc_t *, void *))proc_sample_callback, chart); if (!chart->proc) { VWM_ERROR("Unable to establish proc monitor"); goto _err_free; -- cgit v1.2.3