LCOV - code coverage report
Current view: top level - lib - gcd.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 4 0.0 %
Date: 2014-02-18 Functions: 0 1 0.0 %
Branches: 0 6 0.0 %

           Branch data     Line data    Source code
       1                 :            : #include <linux/kernel.h>
       2                 :            : #include <linux/gcd.h>
       3                 :            : #include <linux/export.h>
       4                 :            : 
       5                 :            : /* Greatest common divisor */
       6                 :          0 : unsigned long gcd(unsigned long a, unsigned long b)
       7                 :            : {
       8                 :            :         unsigned long r;
       9                 :            : 
      10         [ #  # ]:          0 :         if (a < b)
      11                 :            :                 swap(a, b);
      12                 :            : 
      13         [ #  # ]:          0 :         if (!b)
      14                 :            :                 return a;
      15         [ #  # ]:          0 :         while ((r = a % b) != 0) {
      16                 :            :                 a = b;
      17                 :            :                 b = r;
      18                 :            :         }
      19                 :            :         return b;
      20                 :            : }
      21                 :            : EXPORT_SYMBOL_GPL(gcd);

Generated by: LCOV version 1.9