Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh5/sh5 Quell an uninitialised variable warning.



details:   https://anonhg.NetBSD.org/src/rev/bb318c72ff65
branches:  trunk
changeset: 538197:bb318c72ff65
user:      scw <scw%NetBSD.org@localhost>
date:      Mon Oct 14 09:46:31 2002 +0000

description:
Quell an uninitialised variable warning.

diffstat:

 sys/arch/sh5/sh5/syscall.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (57 lines):

diff -r c242e98e1b19 -r bb318c72ff65 sys/arch/sh5/sh5/syscall.c
--- a/sys/arch/sh5/sh5/syscall.c        Mon Oct 14 08:48:15 2002 +0000
+++ b/sys/arch/sh5/sh5/syscall.c        Mon Oct 14 09:46:31 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syscall.c,v 1.3 2002/07/12 20:43:12 scw Exp $  */
+/*     $NetBSD: syscall.c,v 1.4 2002/10/14 09:46:31 scw Exp $  */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -209,10 +209,7 @@
        nargs = callp->sy_narg + hidden;
        switch (nargs) {
        default:
-               error = copyin((caddr_t)(uintptr_t)tf->tf_caller.r15,
-                   &copyargs[8], (nargs - 8) * sizeof(register_t));
-               if (error)
-                       goto bad;
+               args = copyargs;
                copyargs[0] = tf->tf_caller.r2;
                copyargs[1] = tf->tf_caller.r3;
                copyargs[2] = tf->tf_caller.r4;
@@ -221,7 +218,10 @@
                copyargs[5] = tf->tf_caller.r7;
                copyargs[6] = tf->tf_caller.r8;
                copyargs[7] = tf->tf_caller.r9;
-               args = copyargs;
+               error = copyin((caddr_t)(uintptr_t)tf->tf_caller.r15,
+                   &copyargs[8], (nargs - 8) * sizeof(register_t));
+               if (error)
+                       goto bad;
                break;
 
        case 8:
@@ -307,10 +307,7 @@
        nargs = callp->sy_narg + hidden;
        switch (nargs) {
        default:
-               error = copyin((caddr_t)(uintptr_t)tf->tf_caller.r15,
-                   &copyargs[8], (nargs - 8) * sizeof(register_t));
-               if (error)
-                       goto bad;
+               args = copyargs;
                copyargs[0] = tf->tf_caller.r2;
                copyargs[1] = tf->tf_caller.r3;
                copyargs[2] = tf->tf_caller.r4;
@@ -319,7 +316,10 @@
                copyargs[5] = tf->tf_caller.r7;
                copyargs[6] = tf->tf_caller.r8;
                copyargs[7] = tf->tf_caller.r9;
-               args = copyargs;
+               error = copyin((caddr_t)(uintptr_t)tf->tf_caller.r15,
+                   &copyargs[8], (nargs - 8) * sizeof(register_t));
+               if (error)
+                       goto bad;
                break;
 
        case 8:



Home | Main Index | Thread Index | Old Index