From: Aaron Taylor Date: Mon, 23 Sep 2019 06:41:42 +0000 (-0700) Subject: Minor rewriting of gcd(). X-Git-Url: http://git.subgeniuskitty.com/icmpmonitor/.git/commitdiff_plain/71b885953a1541f0067c08a08618c223f5fb99ba Minor rewriting of gcd(). --- diff --git a/icmpmonitor.c b/icmpmonitor.c index f2bf43e..6eb450f 100644 --- a/icmpmonitor.c +++ b/icmpmonitor.c @@ -347,10 +347,10 @@ get_host_addr(const char * name) return(res); } -static int -gcd(int x, int y) +size_t +gcd(const size_t x, const size_t y) { - int remainder = x % y; + size_t remainder = x % y; if (remainder == 0) return y; return gcd(y, remainder); }