summaryrefslogtreecommitdiff
path: root/lib/buffer-lcm.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-22 18:56:06 +0200
committerJim Meyering <meyering@redhat.com>2009-08-25 09:21:00 +0200
commit5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 (patch)
treee460d471f37f0dce1ba06f60f88114d1a65326c4 /lib/buffer-lcm.c
parent2bc0f3caaafeb240cdcfd050b7ad1fe0ad14addf (diff)
downloadcoreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.tar.xz
global: convert indentation-TABs to spaces
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'lib/buffer-lcm.c')
-rw-r--r--lib/buffer-lcm.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/buffer-lcm.c b/lib/buffer-lcm.c
index b8d87d31d..ee901741d 100644
--- a/lib/buffer-lcm.c
+++ b/lib/buffer-lcm.c
@@ -34,22 +34,22 @@ buffer_lcm (size_t a, size_t b, size_t lcm_max)
else
{
if (b)
- {
- /* Return lcm (A, B) if it is in range; otherwise, fall back
- on A. */
-
- size_t lcm, m, n, q, r;
-
- /* N = gcd (A, B). */
- for (m = a, n = b; (r = m % n) != 0; m = n, n = r)
- continue;
-
- /* LCM = lcm (A, B), if in range. */
- q = a / n;
- lcm = q * b;
- if (lcm <= lcm_max && lcm / b == q)
- return lcm;
- }
+ {
+ /* Return lcm (A, B) if it is in range; otherwise, fall back
+ on A. */
+
+ size_t lcm, m, n, q, r;
+
+ /* N = gcd (A, B). */
+ for (m = a, n = b; (r = m % n) != 0; m = n, n = r)
+ continue;
+
+ /* LCM = lcm (A, B), if in range. */
+ q = a / n;
+ lcm = q * b;
+ if (lcm <= lcm_max && lcm / b == q)
+ return lcm;
+ }
size = a;
}