From 0f39612c19a4865dcaf5963590b985d4f29c4bd3 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Thu, 3 Dec 2020 17:19:04 +0100 Subject: Style fixes --- 3/part2.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to '3/part2.c') diff --git a/3/part2.c b/3/part2.c index 8bcdcfd..9214c25 100644 --- a/3/part2.c +++ b/3/part2.c @@ -3,9 +3,9 @@ #include #include -int count_trees(int inc_right, int inc_down, const char * filename) +int count_trees(int inc_right, int inc_down, const char *filename) { - FILE * file = fopen(filename, "r"); + FILE *file = fopen(filename, "r"); // Include space for newline and string terminator char buffer[64] = { 0 }; @@ -17,8 +17,7 @@ int count_trees(int inc_right, int inc_down, const char * filename) int pos = inc_right; int hit = 0; for (int i = 1; fgets(buffer, 64, file); i++) { - if (inc_down != 1 && i % inc_down != 0) - { + if (inc_down != 1 && i % inc_down != 0) { continue; } -- cgit v1.2.3