From 8889f4a5edad040f47c3fcb717053352ab0d05b8 Mon Sep 17 00:00:00 2001 From: Jorawar Singh Date: Tue, 4 Jul 2017 15:14:46 +0530 Subject: Fixed standalone conversion errors with RPi files --- 2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd') diff --git a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c index 3d586232..121d26ae 100644 --- a/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c +++ b/2.3-1/src/c/elementaryFunctions/discrete_mathematics/gcd/u8gcda.c @@ -31,7 +31,8 @@ uint8 u8gcdua(uint8* in,int size) int x=*in; int y=*(in+1); int max=(x>y)?x:y; - for(int i=max;i>=1;i--) + int i; + for(i=max;i>=1;i--) { if(x%i==0 && y%i==0) { @@ -39,12 +40,13 @@ uint8 u8gcdua(uint8* in,int size) break; } } - for(int j=2;jy)?x:y; - for(int i=max;i>=1;i--) + for(i=max;i>=1;i--) { if(x%i==0 && y%i==0) { -- cgit