LCOV - code coverage report
Current view: top level - test - ptr_helpers.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 12 12 100.0 %
Date: 2021-11-24 03:28:48 Functions: 4 4 100.0 %

          Line data    Source code
       1             : /* Copyright (c) 2001-2004, Roger Dingledine.
       2             :  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
       3             :  * Copyright (c) 2007-2021, The Tor Project, Inc. */
       4             : /* See LICENSE for licensing information */
       5             : 
       6             : #include "test/ptr_helpers.h"
       7             : 
       8             : /**
       9             :  * Cast <b> (inptr_t value) to a void pointer.
      10             :  */
      11             : void *
      12        8260 : cast_intptr_to_voidstar(intptr_t x)
      13             : {
      14        8260 :   void *r = (void *)x;
      15             : 
      16        8260 :   return r;
      17             : }
      18             : 
      19             : /**
      20             :  * Cast x (void pointer) to inptr_t value.
      21             :  */
      22             : intptr_t
      23        4130 : cast_voidstar_to_intptr(void *x)
      24             : {
      25        4130 :   intptr_t r = (intptr_t)x;
      26             : 
      27        4130 :   return r;
      28             : }
      29             : 
      30             : /**
      31             :  * Cast x (uinptr_t value) to void pointer.
      32             :  */
      33             : void *
      34        4162 : cast_uintptr_to_voidstar(uintptr_t x)
      35             : {
      36        4162 :   void *r = (void *)x;
      37             : 
      38        4162 :   return r;
      39             : }
      40             : 
      41             : /**
      42             :  * Cast x (void pointer) to uinptr_t value.
      43             :  */
      44             : uintptr_t
      45        2081 : cast_voidstar_to_uintptr(void *x)
      46             : {
      47        2081 :   uintptr_t r = (uintptr_t)x;
      48             : 
      49        2081 :   return r;
      50             : }

Generated by: LCOV version 1.14