From: Eugene Syromyatnikov Date: Wed, 4 Apr 2018 13:47:49 +0000 (+0200) Subject: Return RVAL_STR unconditionally X-Git-Tag: v4.22~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7154bf1461cacc32065f383152491cc87baa81c;p=strace 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. --- diff --git a/sched.c b/sched.c index 5e74c2ee..394fcafb 100644 --- a/sched.c +++ b/sched.c @@ -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; } diff --git a/time.c b/time.c index 31f44fc6..fa8c9db4 100644 --- a/time.c +++ b/time.c @@ -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)