LCOV - code coverage report
Current view: top level - lib/libc/minimal/source/string - strncasecmp.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 9 0.0 %
Date: 2022-08-18 11:36:24 Functions: 0 1 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (c) 2018 Intel Corporation
       3                 :            :  *
       4                 :            :  * SPDX-License-Identifier: Apache-2.0
       5                 :            :  */
       6                 :            : 
       7                 :            : #include <stdlib.h>
       8                 :            : #include <ctype.h>
       9                 :            : 
      10                 :            : int
      11                 :          0 : strncasecmp(const char *s1, const char *s2, size_t n)
      12                 :            : {
      13                 :          0 :         unsigned char c = 1U;
      14                 :            : 
      15   [ #  #  #  # ]:          0 :         for (; c && n != 0; n--) {
      16                 :            :                 unsigned char lower1, lower2;
      17                 :            : 
      18                 :          0 :                 c = *s1++;
      19                 :          0 :                 lower1 = tolower(c);
      20                 :          0 :                 lower2 = tolower(*s2++);
      21                 :            : 
      22         [ #  # ]:          0 :                 if (lower1 != lower2) {
      23                 :          0 :                         return (lower1 > lower2) - (lower1 < lower2);
      24                 :            :                 }
      25                 :            :         }
      26                 :            : 
      27                 :          0 :         return 0;
      28                 :            : }

Generated by: LCOV version 1.14