From 8076d839bf69e619f2e504122ec2ceb790a0b978 Mon Sep 17 00:00:00 2001 From: Julian T Date: Sat, 15 Feb 2020 20:28:59 +0100 Subject: Changed to a more consistent codestyle --- sem3/algo/mm3/multiply.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sem3/algo/mm3/multiply.c') diff --git a/sem3/algo/mm3/multiply.c b/sem3/algo/mm3/multiply.c index e454de3..da8068c 100644 --- a/sem3/algo/mm3/multiply.c +++ b/sem3/algo/mm3/multiply.c @@ -3,12 +3,13 @@ #include #include -uint64_t mult(uint64_t x, uint64_t y, unsigned int bits) { +uint64_t mult(uint64_t x, uint64_t y, unsigned int bits) +{ /* Check if they expect more than 64 bits. */ - if( bits > 64 ) { + if ( bits > 64 ) { printf("Sorry we cant handle higher than 64 bits\n"); exit(1); - } else if(bits <= 1) { + } else if (bits <= 1) { return x && y; } @@ -37,7 +38,8 @@ uint64_t mult(uint64_t x, uint64_t y, unsigned int bits) { } -int main(void) { +int main(void) +{ uint32_t a = 0xFFFFFF; uint8_t b = 55; -- cgit v1.2.3