skill: fixup inconsistencies in result type references
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
7d20df9ef0
commit
00818a471b
16
skill.c
16
skill.c
@ -164,10 +164,11 @@ static int match_ns(const int pid)
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ask_user(struct pids_stack *stack)
|
|
||||||
{
|
|
||||||
#define PIDS_GETINT(e) PIDS_VAL(EU_ ## e, s_int, stack, Pids_info)
|
#define PIDS_GETINT(e) PIDS_VAL(EU_ ## e, s_int, stack, Pids_info)
|
||||||
#define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, stack, Pids_info)
|
#define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, stack, Pids_info)
|
||||||
|
|
||||||
|
static int ask_user(struct pids_stack *stack)
|
||||||
|
{
|
||||||
char *buf=NULL;
|
char *buf=NULL;
|
||||||
size_t len=0;
|
size_t len=0;
|
||||||
|
|
||||||
@ -217,6 +218,7 @@ static void nice_or_kill(struct pids_stack *stack,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef PIDS_GETINT
|
#undef PIDS_GETINT
|
||||||
#undef PIDS_GETSTR
|
#undef PIDS_GETSTR
|
||||||
|
|
||||||
@ -264,8 +266,9 @@ static void show_lists(void)
|
|||||||
|
|
||||||
static void scan_procs(struct run_time_conf_t *run_time)
|
static void scan_procs(struct run_time_conf_t *run_time)
|
||||||
{
|
{
|
||||||
#define PIDS_GETINT(e) PIDS_VAL(EU_ ## e, s_int, reap->stacks[i], Pids_info)
|
#define PIDS_GETINT(e) PIDS_VAL(EU_ ## e, s_int, reap->stacks[i], Pids_info)
|
||||||
#define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, reap->stacks[i], Pids_info)
|
#define PIDS_GETUNT(e) PIDS_VAL(EU_ ## e, u_int, reap->stacks[i], Pids_info)
|
||||||
|
#define PIDS_GETSTR(e) PIDS_VAL(EU_ ## e, str, reap->stacks[i], Pids_info)
|
||||||
struct pids_fetch *reap;
|
struct pids_fetch *reap;
|
||||||
int i, total_procs;
|
int i, total_procs;
|
||||||
|
|
||||||
@ -280,7 +283,7 @@ static void scan_procs(struct run_time_conf_t *run_time)
|
|||||||
for (i=0; i < total_procs; i++) {
|
for (i=0; i < total_procs; i++) {
|
||||||
if (PIDS_GETINT(PID) == my_pid || PIDS_GETINT(PID) == 0)
|
if (PIDS_GETINT(PID) == my_pid || PIDS_GETINT(PID) == 0)
|
||||||
continue;
|
continue;
|
||||||
if (uids && !match_intlist(PIDS_GETINT(EUID), uid_count, (int *)uids))
|
if (uids && !match_intlist(PIDS_GETUNT(EUID), uid_count, (int *)uids))
|
||||||
continue;
|
continue;
|
||||||
if (ttys && !match_intlist(PIDS_GETINT(TTY), tty_count, ttys))
|
if (ttys && !match_intlist(PIDS_GETINT(TTY), tty_count, ttys))
|
||||||
continue;
|
continue;
|
||||||
@ -291,6 +294,9 @@ static void scan_procs(struct run_time_conf_t *run_time)
|
|||||||
nice_or_kill(reap->stacks[i], run_time);
|
nice_or_kill(reap->stacks[i], run_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#undef PIDS_GETINT
|
||||||
|
#undef PIDS_GETUNT
|
||||||
|
#undef PIDS_GETSTR
|
||||||
}
|
}
|
||||||
|
|
||||||
/* skill and snice help */
|
/* skill and snice help */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user