summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_connmark.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-27 17:39:01 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-01-27 23:14:29 +0100
commita80975497968e69b23f56bf15d346c65bec381f2 (patch)
treeb552d7fb9bea99250cbbafc45bb58e8b04c0c073 /extensions/libxt_connmark.c
parent7a63ca74dbcd323217cab7296e68a19b8c9ea6c4 (diff)
extensions: use UINT_MAX constants over open-coded bits (1/2)
~0 depends on the sizeof(int), so it is better to use UINT32_MAX. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libxt_connmark.c')
-rw-r--r--extensions/libxt_connmark.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/libxt_connmark.c b/extensions/libxt_connmark.c
index bc7ef45b..fbd3e62c 100644
--- a/extensions/libxt_connmark.c
+++ b/extensions/libxt_connmark.c
@@ -49,16 +49,16 @@ connmark_mt_parse(int c, char **argv, int invert, unsigned int *flags,
const void *entry, struct xt_entry_match **match)
{
struct xt_connmark_mtinfo1 *info = (void *)(*match)->data;
- unsigned int mark, mask = ~0U;
+ unsigned int mark, mask = UINT32_MAX;
char *end;
switch (c) {
case '1': /* --mark */
param_act(P_ONLY_ONCE, "connmark", "--mark", *flags & F_MARK);
- if (!strtonum(optarg, &end, &mark, 0, ~0U))
+ if (!strtonum(optarg, &end, &mark, 0, UINT32_MAX))
param_act(P_BAD_VALUE, "connmark", "--mark", optarg);
if (*end == '/')
- if (!strtonum(end + 1, &end, &mask, 0, ~0U))
+ if (!strtonum(end + 1, &end, &mask, 0, UINT32_MAX))
param_act(P_BAD_VALUE, "connmark", "--mark", optarg);
if (*end != '\0')
param_act(P_BAD_VALUE, "connmark", "--mark", optarg);