Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto Remove duplicate assignment.



details:   https://anonhg.NetBSD.org/src/rev/94a6fe04fcd5
branches:  trunk
changeset: 353046:94a6fe04fcd5
user:      maya <maya%NetBSD.org@localhost>
date:      Tue Apr 18 17:05:05 2017 +0000

description:
Remove duplicate assignment.
We assign the same value unconditionally just before.

from clang static analyzer

XXX surrounding code seems fishy

diffstat:

 sys/opencrypto/cryptosoft.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 6dac805275e2 -r 94a6fe04fcd5 sys/opencrypto/cryptosoft.c
--- a/sys/opencrypto/cryptosoft.c       Tue Apr 18 16:30:21 2017 +0000
+++ b/sys/opencrypto/cryptosoft.c       Tue Apr 18 17:05:05 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptosoft.c,v 1.48 2017/04/13 01:24:34 ozaki-r Exp $ */
+/*     $NetBSD: cryptosoft.c,v 1.49 2017/04/18 17:05:05 maya Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $       */
 /*     $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
 
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.48 2017/04/13 01:24:34 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.49 2017/04/18 17:05:05 maya Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -759,7 +759,6 @@
        if (result < crd->crd_len) {
                adj = result - crd->crd_len;
                if (outtype == CRYPTO_BUF_MBUF) {
-                       adj = result - crd->crd_len;
                        m_adj((struct mbuf *)buf, adj);
                }
                /* Don't adjust the iov_len, it breaks the kmem_free */



Home | Main Index | Thread Index | Old Index