diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index d35a144f6..4520b893b 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -683,10 +683,10 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)), return 0; } - av->i_value = (v < INT32_MAX) ? (int32_t) v : INT32_MAX; - av->ui_value = (v < UINT32_MAX) ? (uint32_t) v : UINT32_MAX; - av->i64_value = (v < INT64_MAX) ? (int64_t) v : INT64_MAX; - av->ui64_value = (v < UINT64_MAX) ? (uint64_t) v : UINT64_MAX; + av->i_value = ((int32_t) v < INT32_MAX) ? (int32_t) v : INT32_MAX; + av->ui_value = ((uint32_t) v < UINT32_MAX) ? (uint32_t) v : UINT32_MAX; + av->i64_value = ((int64_t) v < INT64_MAX) ? (int64_t) v : INT64_MAX; + av->ui64_value = ((uint64_t) v < UINT64_MAX) ? (uint64_t) v : UINT64_MAX; return 1; }