summaryrefslogtreecommitdiffstats
path: root/lib/parse.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-12-19 03:09:09 +0100
committerJan Engelhardt <jengelh@medozas.de>2010-12-19 06:12:19 +0100
commit8673a740e4279e553e31e1b82ac8e4061ab5dc6f (patch)
treedf3e3f04d24540bda981040cda0d5430a4d76b82 /lib/parse.c
parentbab610b39445a95ea2d566bc41d4be14074bf1c8 (diff)
libipset: remove redundant casts
Diffstat (limited to 'lib/parse.c')
-rw-r--r--lib/parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/parse.c b/lib/parse.c
index 01b0ccf..437ff61 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;
}