From 96c5e03edc6ae233767fdbc58c0914d7b205af99 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 20 Sep 2023 12:44:22 -0300 Subject: [PATCH] isinetaddr4: `in_range` -> `within_range` --- src/isinetaddr4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/isinetaddr4.c b/src/isinetaddr4.c index 9cdb8eb..e30a202 100644 --- a/src/isinetaddr4.c +++ b/src/isinetaddr4.c @@ -9,7 +9,7 @@ static const int MAX_OCTETS = 4; static const int MAX_DIGITLEN = 12; static const int MAX_STRLEN = 16; static const char SEP = '.'; -static int in_range(char buf[MAX_BUFLEN]); +static int within_range(char buf[MAX_BUFLEN]); int isinetaddr4(const char *str) @@ -33,7 +33,7 @@ isinetaddr4(const char *str) } else { buf[buflen++] = str[l]; digits++; - if (!in_range(buf)) { + if (!within_range(buf)) { return 0; } else if (str[l-1] == SEP) { octets++; @@ -47,7 +47,7 @@ isinetaddr4(const char *str) } static int -in_range(char buf[MAX_BUFLEN]) +within_range(char buf[MAX_BUFLEN]) { int n = atoi(buf); return n >= 0 && n <= 255;