Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86/x86 Fold constant. err is always 0, so switch t...



details:   https://anonhg.NetBSD.org/src/rev/2dc2a833111f
branches:  trunk
changeset: 745598:2dc2a833111f
user:      maya <maya%NetBSD.org@localhost>
date:      Sat Mar 07 13:28:45 2020 +0000

description:
Fold constant. err is always 0, so switch to return 0;

diffstat:

 sys/arch/x86/x86/via_padlock.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r a26d92a6a451 -r 2dc2a833111f sys/arch/x86/x86/via_padlock.c
--- a/sys/arch/x86/x86/via_padlock.c    Sat Mar 07 13:01:07 2020 +0000
+++ b/sys/arch/x86/x86/via_padlock.c    Sat Mar 07 13:28:45 2020 +0000
@@ -1,5 +1,5 @@
 /*     $OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $     */
-/*     $NetBSD: via_padlock.c,v 1.27 2020/03/07 12:31:50 fcambus Exp $ */
+/*     $NetBSD: via_padlock.c,v 1.28 2020/03/07 13:28:45 maya Exp $ */
 
 /*-
  * Copyright (c) 2003 Jason Wright
@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.27 2020/03/07 12:31:50 fcambus Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.28 2020/03/07 13:28:45 maya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -370,7 +370,6 @@
     struct via_padlock_session *ses, struct via_padlock_softc *sc, void *buf)
 {
        uint32_t *key;
-       int err = 0;
 
        if ((crd->crd_len % 16) != 0)
                return (EINVAL);
@@ -461,7 +460,7 @@
                sc->op_buf = NULL;
        }
 
-       return (err);
+       return 0;
 }
 
 int



Home | Main Index | Thread Index | Old Index