Return RVAL_STR unconditionally

There is no reason to check for auxstr being non-NULL
because syscall_exiting_trace already does the check.

* sched.c (SYS_FUNC(sched_getscheduler)): Do not check tcp->auxstr,
return RVAL_STR unconditionally.
* time.c (do_adjtimex): Likewise.
This commit is contained in:
Eugene Syromyatnikov 2018-04-04 15:47:49 +02:00 committed by Dmitry V. Levin
parent 0f368cd8cb
commit b7154bf146
2 changed files with 2 additions and 5 deletions

View File

@ -42,8 +42,7 @@ SYS_FUNC(sched_getscheduler)
tprintf("%d", (int) tcp->u_arg[0]);
} else if (!syserror(tcp)) {
tcp->auxstr = xlookup(schedulers, (kernel_ulong_t) tcp->u_rval);
if (tcp->auxstr != NULL)
return RVAL_STR;
return RVAL_STR;
}
return 0;
}

4
time.c
View File

@ -173,9 +173,7 @@ do_adjtimex(struct tcb *const tcp, const kernel_ulong_t addr)
if (print_timex(tcp, addr))
return 0;
tcp->auxstr = xlookup(adjtimex_state, (kernel_ulong_t) tcp->u_rval);
if (tcp->auxstr)
return RVAL_STR;
return 0;
return RVAL_STR;
}
SYS_FUNC(adjtimex)