From 3e902efd18c5f7fa4ab795b94ce18add4456f7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Fri, 30 Dec 2016 17:51:48 +0100 Subject: [PATCH] Small cleanup. --- src/list.c | 1 - src/list.h | 1 - src/main.c | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/list.c b/src/list.c index d8e05df..11482e9 100644 --- a/src/list.c +++ b/src/list.c @@ -1,6 +1,5 @@ #include "list.h" #include -#include /** * This is the number of elements by which the list expands. diff --git a/src/list.h b/src/list.h index b600654..e38a680 100644 --- a/src/list.h +++ b/src/list.h @@ -7,7 +7,6 @@ */ #pragma once #include -#include /** * @brief An infinitely expanding list type. diff --git a/src/main.c b/src/main.c index d6ce987..0237d87 100644 --- a/src/main.c +++ b/src/main.c @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) { for(size_t i = 0; mpz_cmp(primes.list[i], halfNum) < 0; ++i) { // If `num' is divisible by a prime then go to the next number if(mpz_divisible_p(num, primes.list[i]) != 0) - goto nextPrime; + goto nextNum; } // `num' is a prime so we add it to the list and print it @@ -186,7 +186,7 @@ int main(int argc, char *argv[]) { printf("\n"); } -nextPrime: +nextNum: // Add 2 (skip even numbers since they're all divisible by 2) mpz_add_ui(num, num, 2); } while(run);