diff options
author | Ronny Chevalier <chevalier.ronny@gmail.com> | 2016-08-05 13:35:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-05 13:35:52 +0200 |
commit | 96533edceb5bb626a674acda2843de72838811cf (patch) | |
tree | 58d255848f99af24009cea575d4d58ec53d6874d /src/run/run.c | |
parent | 1ed1f50f8277df07918e13cba3331a114eaa6fe3 (diff) | |
parent | 41bf0590cc89438f1d319465190b1c00809c78fe (diff) |
Merge pull request #3902 from poettering/parse-nice
util-lib: unify parsing of nice level values
Diffstat (limited to 'src/run/run.c')
-rw-r--r-- | src/run/run.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/run/run.c b/src/run/run.c index 58fa49a4d1..1917ffd857 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -257,11 +257,9 @@ static int parse_argv(int argc, char *argv[]) { break; case ARG_NICE: - r = safe_atoi(optarg, &arg_nice); - if (r < 0 || arg_nice < PRIO_MIN || arg_nice >= PRIO_MAX) { - log_error("Failed to parse nice value"); - return -EINVAL; - } + r = parse_nice(optarg, &arg_nice); + if (r < 0) + return log_error_errno(r, "Failed to parse nice value: %s", optarg); arg_nice_set = true; break; |