Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto Initialize the session variable to an impossi...



details:   https://anonhg.NetBSD.org/src/rev/1b250566a901
branches:  trunk
changeset: 467176:1b250566a901
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 16 15:29:24 2020 +0000

description:
Initialize the session variable to an impossible session to prevent compiler
warnings.

diffstat:

 sys/opencrypto/cryptodev.c  |  5 +++--
 sys/opencrypto/ocryptodev.c |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r 415c876cf369 -r 1b250566a901 sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c        Thu Jan 16 13:56:24 2020 +0000
+++ b/sys/opencrypto/cryptodev.c        Thu Jan 16 15:29:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptodev.c,v 1.102 2019/11/29 08:30:30 hikaru Exp $ */
+/*     $NetBSD: cryptodev.c,v 1.103 2020/01/16 15:29:24 christos Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $   */
 
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.102 2019/11/29 08:30:30 hikaru Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.103 2020/01/16 15:29:24 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1787,6 +1787,7 @@
                s_op.key =              sn_ops->key;
                s_op.mackeylen =        sn_ops->mackeylen;
                s_op.mackey =           sn_ops->mackey;
+               s_op.ses =              ~0;
 
                sn_ops->status = cryptodev_session(fcr, &s_op);
 
diff -r 415c876cf369 -r 1b250566a901 sys/opencrypto/ocryptodev.c
--- a/sys/opencrypto/ocryptodev.c       Thu Jan 16 13:56:24 2020 +0000
+++ b/sys/opencrypto/ocryptodev.c       Thu Jan 16 15:29:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ocryptodev.c,v 1.14 2019/12/12 02:15:43 pgoyette Exp $ */
+/*     $NetBSD: ocryptodev.c,v 1.15 2020/01/16 15:29:24 christos Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $   */
 
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ocryptodev.c,v 1.14 2019/12/12 02:15:43 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ocryptodev.c,v 1.15 2020/01/16 15:29:24 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -279,6 +279,7 @@
                os_op.key =             osn_ops->key;
                os_op.mackeylen =       osn_ops->mackeylen;
                os_op.mackey =          osn_ops->mackey;
+               os_op.ses =             ~0;
 
                osn_ops->status = ocryptodev_session(fcr, &os_op);
                osn_ops->ses =          os_op.ses;



Home | Main Index | Thread Index | Old Index