diff options
author | xebd <xeb@mail.ru> | 2021-03-17 11:30:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-17 11:30:45 +0300 |
commit | 02ee3cf8abebec16bf9106426e095495144c3d2f (patch) | |
tree | d871c149812c68b7ceee591f6bb265f4ad643414 /accel-pppd/extra | |
parent | 49ef6cf969f662c44f4be2b82b101273c8c6de71 (diff) | |
parent | 2785d81ec848ebb920c8a612b4eae7876a619a18 (diff) | |
download | accel-ppp-02ee3cf8abebec16bf9106426e095495144c3d2f.tar.gz accel-ppp-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c index 5e0098ac..2ca8b6f6 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) |