Files
linux-apfs/lib/lcm.c
T

15 lines
271 B
C
Raw Normal View History

2015-02-12 15:03:21 -08:00
#include <linux/compiler.h>
#include <linux/gcd.h>
#include <linux/export.h>
2011-07-25 17:13:20 -07:00
#include <linux/lcm.h>
/* Lowest common multiple */
unsigned long lcm(unsigned long a, unsigned long b)
{
if (a && b)
return (a / gcd(a, b)) * b;
2014-12-10 15:51:29 -08:00
else
return 0;
}
EXPORT_SYMBOL_GPL(lcm);