summaryrefslogtreecommitdiff
path: root/accel-pppd/extra
diff options
context:
space:
mode:
authorxebd <xeb@mail.ru>2021-03-17 11:30:45 +0300
committerGitHub <noreply@github.com>2021-03-17 11:30:45 +0300
commit02ee3cf8abebec16bf9106426e095495144c3d2f (patch)
treed871c149812c68b7ceee591f6bb265f4ad643414 /accel-pppd/extra
parent49ef6cf969f662c44f4be2b82b101273c8c6de71 (diff)
parent2785d81ec848ebb920c8a612b4eae7876a619a18 (diff)
downloadaccel-ppp-xebd-02ee3cf8abebec16bf9106426e095495144c3d2f.tar.gz
accel-ppp-xebd-02ee3cf8abebec16bf9106426e095495144c3d2f.zip
Merge pull request #153 from anphsw/master
Some bugfixes found by cppcheck
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r--accel-pppd/extra/ippool.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index 5e0098a..2ca8b6f 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -109,7 +109,8 @@ static void parse_gw_ip_address(const char *val)
//parses ranges like x.x.x.x/mask
static int parse1(const char *str, uint32_t *begin, uint32_t *end)
{
- int n, f1, f2, f3, f4, m;
+ int n;
+ unsigned int f1, f2, f3, f4, m;
n = sscanf(str, "%u.%u.%u.%u/%u",&f1, &f2, &f3, &f4, &m);
if (n != 5)
@@ -136,7 +137,8 @@ static int parse1(const char *str, uint32_t *begin, uint32_t *end)
//parses ranges like x.x.x.x-y
static int parse2(const char *str, uint32_t *begin, uint32_t *end)
{
- int n, f1, f2, f3, f4, f5;
+ int n;
+ unsigned int f1, f2, f3, f4, f5;
n = sscanf(str, "%u.%u.%u.%u-%u",&f1, &f2, &f3, &f4, &f5);
if (n != 5)