MPI_NULL is replaced with normal NULL.
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Reviewed-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
typedef struct gcry_mpi *MPI;
typedef struct gcry_mpi *MPI;
#define mpi_get_nlimbs(a) ((a)->nlimbs)
#define mpi_is_neg(a) ((a)->sign)
#define mpi_get_nlimbs(a) ((a)->nlimbs)
#define mpi_is_neg(a) ((a)->sign)
uint8_t *frame, *fr_pt;
int i = 0, n;
size_t asnlen = DIM(asn);
uint8_t *frame, *fr_pt;
int i = 0, n;
size_t asnlen = DIM(asn);
if (SHA1_DIGEST_LENGTH + asnlen + 4 > nframe)
pr_info("MPI: can't encode a %d bit MD into a %d bits frame\n",
if (SHA1_DIGEST_LENGTH + asnlen + 4 > nframe)
pr_info("MPI: can't encode a %d bit MD into a %d bits frame\n",
*/
frame = kmalloc(nframe, GFP_KERNEL);
if (!frame)
*/
frame = kmalloc(nframe, GFP_KERNEL);
if (!frame)
n = 0;
frame[n++] = 0;
frame[n++] = 1; /* block type */
n = 0;
frame[n++] = 0;
frame[n++] = 1; /* block type */
int i, j;
unsigned nbits, nbytes, nlimbs, nread = 0;
mpi_limb_t a;
int i, j;
unsigned nbits, nbytes, nlimbs, nread = 0;
mpi_limb_t a;
if (*ret_nread < 2)
goto leave;
if (*ret_nread < 2)
goto leave;
nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB;
val = mpi_alloc(nlimbs);
if (!val)
nlimbs = (nbytes + BYTES_PER_MPI_LIMB - 1) / BYTES_PER_MPI_LIMB;
val = mpi_alloc(nlimbs);
if (!val)
i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB;
i %= BYTES_PER_MPI_LIMB;
val->nbits = nbits;
i = BYTES_PER_MPI_LIMB - nbytes % BYTES_PER_MPI_LIMB;
i %= BYTES_PER_MPI_LIMB;
val->nbits = nbits;
if (a) {
b = mpi_alloc(a->nlimbs);
if (a) {
b = mpi_alloc(a->nlimbs);