summaryrefslogtreecommitdiffstats
path: root/extensions/libip6t_dst.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-27 17:24:34 +0100
committerJan Engelhardt <jengelh@medozas.de>2009-01-27 23:14:26 +0100
commit213e185afbb298e6708881e4c2adffdc47a8b6da (patch)
tree1e37c6e65c7541794742b3f08acfb2517d198ed3 /extensions/libip6t_dst.c
parent825c317eedc12e1c8c93e22a96bc423d27b3c1f4 (diff)
src: remove redundant casts
All of them are implicitly convertable without any wanted side effects. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libip6t_dst.c')
-rw-r--r--extensions/libip6t_dst.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/libip6t_dst.c b/extensions/libip6t_dst.c
index 215e2d95..43562c17 100644
--- a/extensions/libip6t_dst.c
+++ b/extensions/libip6t_dst.c
@@ -49,7 +49,7 @@ parse_opts_num(const char *idstr, const char *typestr)
exit_error(PARAMETER_PROBLEM,
"dst: error parsing %s `%s'", typestr, idstr);
}
- return (u_int32_t) id;
+ return id;
}
static int
@@ -78,13 +78,12 @@ parse_options(const char *optsstr, u_int16_t *opts)
*range++ = '\0';
}
- opts[i] = (u_int16_t)((parse_opts_num(cp,"opt") & 0x000000FF)<<8);
+ opts[i] = (parse_opts_num(cp, "opt") & 0xFF) << 8;
if (range) {
if (opts[i] == 0)
exit_error(PARAMETER_PROBLEM,
"PAD0 hasn't got length");
- opts[i] |= (u_int16_t)(parse_opts_num(range,"length") &
- 0x000000FF);
+ opts[i] |= parse_opts_num(range, "length") & 0xFF;
} else
opts[i] |= (0x00FF);