summaryrefslogtreecommitdiffstats
path: root/3rdparty/openpgm-svn-r1135/pgm/math.c.c89.patch
blob: f6746fc51bfe305c04d6599527509248a0324851 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- math.c	2010-05-21 11:32:22.000000000 +0800
+++ math.c89	2010-08-03 17:25:54.000000000 +0800
@@ -66,9 +66,12 @@
 unsigned
 pgm_spaced_primes_closest (unsigned num)
 {
-	for (unsigned i = 0; i < PGM_N_ELEMENTS(primes); i++)
+	{
+	unsigned i;
+	for (i = 0; i < PGM_N_ELEMENTS(primes); i++)
 		if (primes[i] > num)
 			return primes[i];
+	}
 	return primes[PGM_N_ELEMENTS(primes) - 1];
 }