add/use pid_branch_match macro
This commit is contained in:
parent
b498232e19
commit
17cfaa494a
|
@ -618,9 +618,19 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SIGAR_64BIT
|
#ifdef SIGAR_64BIT
|
||||||
|
|
||||||
#define str2pid(value, ptr) strtoull(value, &ptr, 10)
|
#define str2pid(value, ptr) strtoull(value, &ptr, 10)
|
||||||
|
|
||||||
|
#define pid_branch_match(branch, pid, match_pid) \
|
||||||
|
ptql_op_ui64[branch->op_name](branch, pid, match_pid)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define str2pid(value, ptr) strtoul(value, &ptr, 10)
|
#define str2pid(value, ptr) strtoul(value, &ptr, 10)
|
||||||
|
|
||||||
|
#define pid_branch_match(branch, pid, match_pid) \
|
||||||
|
ptql_op_ui32[branch->op_name](branch, pid, match_pid)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int ptql_branch_init_pid(ptql_parse_branch_t *parsed,
|
static int ptql_branch_init_pid(ptql_parse_branch_t *parsed,
|
||||||
|
@ -715,11 +725,7 @@ static int ptql_pid_match(sigar_t *sigar,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SIGAR_64BIT
|
matched = pid_branch_match(branch, pid, match_pid);
|
||||||
matched = ptql_op_ui64[branch->op_name](branch, pid, match_pid);
|
|
||||||
#else
|
|
||||||
matched = ptql_op_ui32[branch->op_name](branch, pid, match_pid);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return matched ? SIGAR_OK : 1;
|
return matched ? SIGAR_OK : 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue