LCOV - code coverage report
Current view: top level - third_party/heimdal/lib/hcrypto/libtommath - bn_mp_reduce_2k_setup_l.c (source / functions) Hit Total Coverage
Test: coverage report for v4-17-test 1498b464 Lines: 0 10 0.0 %
Date: 2024-06-13 04:01:37 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "tommath_private.h"
       2             : #ifdef BN_MP_REDUCE_2K_SETUP_L_C
       3             : /* LibTomMath, multiple-precision integer library -- Tom St Denis */
       4             : /* SPDX-License-Identifier: Unlicense */
       5             : 
       6             : /* determines the setup value */
       7           0 : mp_err mp_reduce_2k_setup_l(const mp_int *a, mp_int *d)
       8             : {
       9             :    mp_err err;
      10             :    mp_int tmp;
      11             : 
      12           0 :    if ((err = mp_init(&tmp)) != MP_OKAY) {
      13           0 :       return err;
      14             :    }
      15             : 
      16           0 :    if ((err = mp_2expt(&tmp, mp_count_bits(a))) != MP_OKAY) {
      17           0 :       goto LBL_ERR;
      18             :    }
      19             : 
      20           0 :    if ((err = s_mp_sub(&tmp, a, d)) != MP_OKAY) {
      21           0 :       goto LBL_ERR;
      22             :    }
      23             : 
      24           0 : LBL_ERR:
      25           0 :    mp_clear(&tmp);
      26           0 :    return err;
      27             : }
      28             : #endif

Generated by: LCOV version 1.13