summaryrefslogtreecommitdiffstats
path: root/lib/parse.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-20 11:54:26 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2010-12-20 11:54:35 +0100
commit57d871ad46bfaed44e556cb872f4bfab1004d9e1 (patch)
tree05aba4c451f5d6a7025db633d22c556f55d9f351 /lib/parse.c
parent06366c172c487b3038b52e8fe640747b4092a544 (diff)
parent95b9dfb393232f384ccfc671971a0a9387e138d4 (diff)
Merge branch 'master' of git://dev.medozas.de/ipset into ipset-5
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'lib/parse.c')
-rw-r--r--lib/parse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/parse.c b/lib/parse.c
index 01b0ccf..169d2e0 100644
--- a/lib/parse.c
+++ b/lib/parse.c
@@ -48,7 +48,7 @@ ipset_strchr(const char *str, const char *sep)
assert(sep);
for (; *sep != '\0'; sep++)
- if ((match = strchr(str, (int)sep[0])) != NULL
+ if ((match = strchr(str, sep[0])) != NULL
&& str[0] != sep[0]
&& str[strlen(str)-1] != sep[0])
return match;
@@ -103,7 +103,7 @@ string_to_u8(struct ipset_session *session,
unsigned long long num = 0;
err = string_to_number_ll(session, str, 0, 255, &num);
- *ret = (uint8_t) num;
+ *ret = num;
return err;
}
@@ -129,7 +129,7 @@ string_to_u16(struct ipset_session *session,
unsigned long long num = 0;
err = string_to_number_ll(session, str, 0, USHRT_MAX, &num);
- *ret = (uint16_t) num;
+ *ret = num;
return err;
}
@@ -142,7 +142,7 @@ string_to_u32(struct ipset_session *session,
unsigned long long num = 0;
err = string_to_number_ll(session, str, 0, UINT_MAX, &num);
- *ret = (uint32_t) num;
+ *ret = num;
return err;
}
@@ -345,7 +345,7 @@ int
ipset_parse_proto(struct ipset_session *session,
enum ipset_opt opt, const char *str)
{
- struct protoent *protoent;
+ const struct protoent *protoent;
uint8_t proto = 0;
assert(session);