Skip to content

Commit

Permalink
rpmem: drop a redundant check.
Browse files Browse the repository at this point in the history
We just checked that the value is not negative.
  • Loading branch information
kilobyte committed Aug 13, 2021
1 parent e552773 commit 8840d3d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librpmem/rpmem_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ rpmem_util_get_env_uint(const char *env, unsigned *pval)
long val = strtol(env_val, &endptr, 10);

if (endptr[0] != '\0' || val <= 0 ||
(errno == ERANGE &&
(val == LONG_MAX || val == LONG_MIN))) {
(errno == ERANGE && val == LONG_MAX)) {
RPMEM_LOG(ERR, "%s variable must be a positive integer",
env);
} else {
Expand Down

0 comments on commit 8840d3d

Please sign in to comment.