LCOV - code coverage report
Current view: top level - src/utils - dlist.c (source / functions) Hit Total Coverage
Test: FreeTDS coverage Lines: 7 7 100.0 %
Date: 2024-03-23 08:24:27 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* Dlist - dynamic list
       2             :  * Copyright (C) 2016 Frediano Ziglio
       3             :  *
       4             :  * This program is free software; you can redistribute it and/or modify
       5             :  * it under the terms of the GNU General Public License as published by
       6             :  * the Free Software Foundation; either version 2 of the License, or
       7             :  * (at your option) any later version.
       8             :  *
       9             :  * This program is distributed in the hope that it will be useful,
      10             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :  * GNU General Public License for more details.
      13             :  *
      14             :  * You should have received a copy of the GNU General Public License
      15             :  * along with this program; if not, write to the Free Software
      16             :  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      17             :  *
      18             :  */
      19             : 
      20             : #include <config.h>
      21             : #include <assert.h>
      22             : #include <freetds/utils/dlist.h>
      23             : 
      24             : #if ENABLE_EXTRA_CHECKS
      25        8392 : void dlist_ring_check(dlist_ring *ring)
      26             : {
      27        8392 :         const dlist_ring *item = ring;
      28             :         do {
      29       26328 :                 assert(item->prev->next == item);
      30       26328 :                 assert(item->next->prev == item);
      31       26328 :                 item = item->next;
      32       26328 :         } while (item != ring);
      33        8392 : }
      34             : #endif

Generated by: LCOV version 1.13