dead code in arch/alpha/kernel/osf_sys.c (<=2.1.108)

Stefan Traby (stefan@sime.com)
Mon, 13 Jul 1998 23:39:29 +0200


Hi !

Sorry, but it drives me crazy. Better memset even when returning -EINVAL
than this hmm, ahh, dead code, or ? (-14 +1 lines seems ok)
Can someone tell me a real good reason why not to apply:

--- linux/arch/alpha/kernel/osf_sys.c.orig Mon Jul 13 22:49:38 1998
+++ linux/arch/alpha/kernel/osf_sys.c Mon Jul 13 23:18:21 1998
@@ -1204,9 +1204,6 @@
{
struct rusage32 r;

- if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN)
- return -EINVAL;
-
memset(&r, 0, sizeof(r));
switch (who) {
case RUSAGE_SELF:
@@ -1228,17 +1225,7 @@
r.ru_nswap = current->cnswap;
break;
default:
- r.ru_utime.tv_sec = CT_TO_SECS(current->times.tms_utime +
- current->times.tms_cutime);
- r.ru_utime.tv_usec = CT_TO_USECS(current->times.tms_utime +
- current->times.tms_cutime);
- r.ru_stime.tv_sec = CT_TO_SECS(current->times.tms_stime +
- current->times.tms_cstime);
- r.ru_stime.tv_usec = CT_TO_USECS(current->times.tms_stime +
- current->times.tms_cstime);
- r.ru_minflt = current->min_flt + current->cmin_flt;
- r.ru_majflt = current->maj_flt + current->cmaj_flt;
- r.ru_nswap = current->nswap + current->cnswap;
+ return -EINVAL;
break;
}

-- 
  ciao - 
    Stefan

Stefan Traby phone: +43-3133-6107-2 Mitterlasznitzstr. 13 fax: +43-3133-6107-9 8302 Nestelbach mailto://stefan@sime.com Austria

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html