Coverage Report

Created: 2023-09-25 06:08

/src/dropbear/libtommath/bn_mp_set.c
Line
Count
Source (jump to first uncovered line)
1
#include "tommath_private.h"
2
#ifdef BN_MP_SET_C
3
/* LibTomMath, multiple-precision integer library -- Tom St Denis */
4
/* SPDX-License-Identifier: Unlicense */
5
6
/* set to a digit */
7
void mp_set(mp_int *a, mp_digit b)
8
1
{
9
1
   a->dp[0] = b & MP_MASK;
10
1
   a->sign  = MP_ZPOS;
11
1
   a->used  = (a->dp[0] != 0u) ? 1 : 0;
12
1
   MP_ZERO_DIGITS(a->dp + a->used, a->alloc - a->used);
13
1
}
14
#endif