aboutsummaryrefslogtreecommitdiff
path: root/libs/libnet/ip.c
diff options
context:
space:
mode:
authorMarvin Borner2021-05-15 22:36:21 +0200
committerMarvin Borner2021-05-15 22:36:21 +0200
commitdf5a8c5b32733ae5e2d872b1c7baa4311a9d2308 (patch)
tree460b35ad421bc74e75e942a35379621ba168c9ea /libs/libnet/ip.c
parentf97343c268b0fc19bf93d509a019f3d13c7af5a4 (diff)
Strange fixes
I have no ideas halp
Diffstat (limited to 'libs/libnet/ip.c')
-rw-r--r--libs/libnet/ip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/libnet/ip.c b/libs/libnet/ip.c
index 20e1a38..66fd8eb 100644
--- a/libs/libnet/ip.c
+++ b/libs/libnet/ip.c
@@ -12,13 +12,12 @@ int ip_pton(const char *src, u32 *dst)
{
const char *end = src + strlen(src);
u8 tmp[4], *tp;
- int ch = 0;
int saw_digit = 0;
int octets = 0;
*(tp = tmp) = 0;
while (src < end) {
- ch = *src++;
+ int ch = *src++;
if (ch >= '0' && ch <= '9') {
u32 new = *tp * 10 + (ch - '0');