LCOV - code coverage report
Current view: top level - third_party/heimdal/lib/hcrypto/libtommath - bn_s_mp_reverse.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 0 12 0.0 %
Date: 2024-04-21 15:09:00 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "tommath_private.h"
       2             : #ifdef BN_S_MP_REVERSE_C
       3             : /* LibTomMath, multiple-precision integer library -- Tom St Denis */
       4             : /* SPDX-License-Identifier: Unlicense */
       5             : 
       6             : /* reverse an array, used for radix code */
       7           0 : void s_mp_reverse(unsigned char *s, size_t len)
       8             : {
       9           0 :    size_t   ix, iy;
      10           0 :    unsigned char t;
      11             : 
      12           0 :    ix = 0u;
      13           0 :    iy = len - 1u;
      14           0 :    while (ix < iy) {
      15           0 :       t     = s[ix];
      16           0 :       s[ix] = s[iy];
      17           0 :       s[iy] = t;
      18           0 :       ++ix;
      19           0 :       --iy;
      20             :    }
      21           0 : }
      22             : #endif

Generated by: LCOV version 1.14