Subject: Re: irix_times

From: "David S. Miller" <[email-masked]>
Date: Sun, 11 May 1997 18:55:08 -0400

From: Mike Shaver <[email-masked]>
   Date: Sun, 11 May 1997 18:56:35 -0400 (EDT)

   gcc tells me, quite rightly, that error may be used without
   initialization, and I'm wondering if the hiding of error in the C<if
   (tbuf)> block is intentional.

   I assume not, but I thought I'd make sure it just wasn't davem
   outsmarting me again. =)

Thats just my stupidity, the obvious fix is the intended code.

---

From: Mike Shaver <[email-masked]>
Date: Sun, 11 May 1997 18:56:35 -0400 (EDT)

>From sysirix.c:

asmlinkage int irix_times(struct tms * tbuf)
{
        int error;
        lock_kernel();
        if (tbuf) {
                int error = verify_area(VERIFY_WRITE,tbuf,sizeof
*tbuf);
                if (error)
                        goto out;
                __put_user(current->utime,&tbuf->tms_utime);
                __put_user(current->stime,&tbuf->tms_stime);
                __put_user(current->cutime,&tbuf->tms_cutime);
                __put_user(current->cstime,&tbuf->tms_cstime);
        }
        error = 0;

out:
        unlock_kernel();
        return error;
}

Mike

-- 
#> Mike Shaver ([email-masked]) Ingenia Communications Corporation 
#>                   Welcome to the technocracy.
#>                                                                     
#> "you'd be so disappointed
#>              to find out that the magic was not
#>                          really meant for you" - OLP