count_syscall() always returns 0, optimize it
* defs.h (count_syscall): Change return type from int to void. * count.c (count_syscall): Change return type from int to void. * syscall.c (trace_syscall_exiting): Change code around call to count_syscall accordingly. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
This commit is contained in:
parent
2ecba32d52
commit
c95a88f124
6
count.c
6
count.c
@ -47,11 +47,11 @@ static struct call_counts *countv[SUPPORTED_PERSONALITIES];
|
||||
|
||||
static struct timeval shortest = { 1000000, 0 };
|
||||
|
||||
int
|
||||
void
|
||||
count_syscall(struct tcb *tcp, struct timeval *tv)
|
||||
{
|
||||
if (tcp->scno < 0 || tcp->scno >= nsyscalls)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
if (!counts) {
|
||||
counts = calloc(nsyscalls, sizeof(*counts));
|
||||
@ -95,8 +95,6 @@ count_syscall(struct tcb *tcp, struct timeval *tv)
|
||||
if (tv_cmp(tv, &shortest) < 0)
|
||||
shortest = *tv;
|
||||
tv_add(&counts[tcp->scno].time, &counts[tcp->scno].time, tv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
2
defs.h
2
defs.h
@ -571,7 +571,7 @@ extern long do_ptrace(int request, struct tcb *tcp, void *addr, void *data);
|
||||
extern int ptrace_restart(int request, struct tcb *tcp, int sig);
|
||||
extern int force_result(struct tcb *, int, long);
|
||||
extern int trace_syscall(struct tcb *);
|
||||
extern int count_syscall(struct tcb *, struct timeval *);
|
||||
extern void count_syscall(struct tcb *, struct timeval *);
|
||||
extern void printxval(const struct xlat *, int, const char *);
|
||||
extern int printargs(struct tcb *);
|
||||
extern void addflags(const struct xlat *, int);
|
||||
|
Loading…
Reference in New Issue
Block a user