Skip to content

Commit

Permalink
8660 mpi code checks return value of void function
Browse files Browse the repository at this point in the history
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
andy-js authored and Dan McDonald committed May 17, 2018
1 parent e876368 commit 9ee48d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions usr/src/common/mpi/mpi-priv.h
Expand Up @@ -46,14 +46,14 @@
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2017 RackTop Systems.
*
* Sun elects to use this software under the MPL license.
*/

#ifndef _MPI_PRIV_H
#define _MPI_PRIV_H

#pragma ident "%Z%%M% %I% %E% SMI"

/* $Id: mpi-priv.h,v 1.20 2005/11/22 07:16:43 relyea%netscape.com Exp $ */

#include "mpi.h"
Expand Down Expand Up @@ -300,7 +300,7 @@ mp_err MPI_ASM_DECL s_mpv_div_2dx1d(mp_digit Nhi, mp_digit Nlo,

/* c += a * b * (MP_RADIX ** offset); */
#define s_mp_mul_d_add_offset(a, b, c, off) \
(s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off), MP_OKAY)
s_mpv_mul_d_add_prop(MP_DIGITS(a), MP_USED(a), b, MP_DIGITS(c) + off)

typedef struct {
mp_int N; /* modulus N */
Expand Down
6 changes: 3 additions & 3 deletions usr/src/common/mpi/mpmontg.c
Expand Up @@ -40,11 +40,11 @@
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2017 RackTop Systems.
*
* Sun elects to use this software under the MPL license.
*/

#pragma ident "%Z%%M% %I% %E% SMI"

/* $Id: mpmontg.c,v 1.20 2006/08/29 02:41:38 nelson%bolyard.com Exp $ */

/* This file implements moduluar exponentiation using Montgomery's
Expand Down Expand Up @@ -104,7 +104,7 @@ mp_err s_mp_redc(mp_int *T, mp_mont_modulus *mmm)
for (i = 0; i < MP_USED(&mmm->N); ++i ) {
mp_digit m_i = MP_DIGIT(T, i) * mmm->n0prime;
/* T += N * m_i * (MP_RADIX ** i); */
MP_CHECKOK( s_mp_mul_d_add_offset(&mmm->N, m_i, T, i) );
s_mp_mul_d_add_offset(&mmm->N, m_i, T, i);
}
s_mp_clamp(T);

Expand Down

0 comments on commit 9ee48d4

Please sign in to comment.