summaryrefslogtreecommitdiffstats
path: root/xtoptions.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-05-24 02:30:23 +0200
committerJan Engelhardt <jengelh@medozas.de>2011-05-24 14:54:27 +0200
commit0b7a140944738d67b9c4e6f09992c8407eefb18a (patch)
tree8b822c215ba1f70c41829c0a9f249d48b61233f8 /xtoptions.c
parent5e35b7d435c5bc1b3641f76a6601a55d32d63ac8 (diff)
libxtables: use uintmax for xtables_strtoul
Addendum to 2305d5fb42fc059f38fc1bdf53411dbeecdb310b. I noticed that unsigned long long is not consistently used, for example, min/max are still just unsigned long, and strtoul is being called. Instead of changing it to unsigned long long, just use uintmax functions right away so this does not need size-related changing in the future. Cc: JP Abgrall <jpa@google.com> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'xtoptions.c')
-rw-r--r--xtoptions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xtoptions.c b/xtoptions.c
index 9884b7df..e9736a44 100644
--- a/xtoptions.c
+++ b/xtoptions.c
@@ -104,8 +104,8 @@ xtables_options_xfrm(struct option *orig_opts, struct option *oldopts,
static void xtopt_parse_int(struct xt_option_call *cb)
{
const struct xt_option_entry *entry = cb->entry;
- unsigned long long lmin = 0, lmax = UINT32_MAX;
- unsigned long long value;
+ uintmax_t lmin = 0, lmax = UINT32_MAX;
+ uintmax_t value;
if (entry->type == XTTYPE_UINT8)
lmax = UINT8_MAX;
@@ -121,7 +121,7 @@ static void xtopt_parse_int(struct xt_option_call *cb)
if (!xtables_strtoul(cb->arg, NULL, &value, lmin, lmax))
xt_params->exit_err(PARAMETER_PROBLEM,
"%s: bad value for option \"--%s\", "
- "or out of range (%llu-%llu).\n",
+ "or out of range (%ju-%ju).\n",
cb->ext_name, entry->name, lmin, lmax);
if (entry->type == XTTYPE_UINT8) {