return (0);
} /* int ps_list_match */
-static void ps_update_counter (
- _Bool init,
- derive_t *group_counter,
- derive_t *curr_counter, unsigned long *curr_value,
- derive_t new_counter, unsigned long new_value) {
- if (init)
- {
- *curr_value = new_value;
- *curr_counter += new_value;
- *group_counter += new_value;
- return;
- }
-
- if (new_counter < *curr_counter)
- {
- *curr_value = new_counter + (ULONG_MAX - *curr_counter);
- }
- else
- {
- *curr_value = new_counter - *curr_counter;
- }
- *curr_counter = new_counter;
- *group_counter += *curr_value;
+static void ps_update_counter (_Bool init, derive_t *group_counter,
+ derive_t *curr_counter, unsigned long *curr_value,
+ derive_t new_counter, unsigned long new_value)
+{
+ if (init)
+ {
+ *curr_value = new_value;
+ *curr_counter += new_value;
+ *group_counter += new_value;
+ return;
+ }
+
+ if (new_counter < *curr_counter)
+ *curr_value = new_counter + (ULONG_MAX - *curr_counter);
+ else
+ *curr_value = new_counter - *curr_counter;
+
+ *curr_counter = new_counter;
+ *group_counter += *curr_value;
}
/* add process entry to 'instances' of process 'name' (or refresh it) */
for (ps = list_head_g; ps != NULL; ps = ps->next)
{
- _Bool want_init;
+ _Bool want_init;
if ((ps_list_match (name, cmdline, ps)) == 0)
continue;
if (fclose (fh))
{
char errbuf[1024];
- WARNING ("processes: fclose: %s",
- sstrerror (errno, errbuf, sizeof (errbuf)));
+ WARNING ("processes: fclose: %s",
+ sstrerror (errno, errbuf, sizeof (errbuf)));
}
}
closedir (dh);