diff options
-rw-r--r-- | lib/gcd.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -9,6 +9,9 @@ unsigned long gcd(unsigned long a, unsigned long b) if (a < b) swap(a, b); + + if (!b) + return a; while ((r = a % b) != 0) { a = b; b = r; |
index : kernel_samsung_aries.git | ||
kernel/samsung/aries | git repository hosting |
aboutsummaryrefslogtreecommitdiffstats |
-rw-r--r-- | lib/gcd.c | 3 |
@@ -9,6 +9,9 @@ unsigned long gcd(unsigned long a, unsigned long b) if (a < b) swap(a, b); + + if (!b) + return a; while ((r = a % b) != 0) { a = b; b = r; |