X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=2741989c4864ac10cc5b3c8dbb3e18eb10db58b6;hb=02dd6e189a6d2b7f3884ad4cdb3d8c85e009c565;hp=f67c003941b419ad21b49df263771d17cfd044d6;hpb=c264aeab4b0e7b69f469e12e78d4a48b3ed7a66e;p=elogind.git diff --git a/src/core/main.c b/src/core/main.c index f67c00394..2741989c4 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -109,7 +109,7 @@ static usec_t arg_shutdown_watchdog = 10 * USEC_PER_MINUTE; static char **arg_default_environment = NULL; static struct rlimit *arg_default_rlimit[_RLIMIT_MAX] = {}; static uint64_t arg_capability_bounding_set_drop = 0; -static nsec_t arg_timer_slack_nsec = (nsec_t) -1; +static nsec_t arg_timer_slack_nsec = NSEC_INFINITY; static usec_t arg_default_timer_accuracy_usec = 1 * USEC_PER_MINUTE; static Set* arg_syscall_archs = NULL; static FILE* arg_serialization = NULL; @@ -1604,7 +1604,7 @@ int main(int argc, char *argv[]) { if (arg_running_as == SYSTEMD_SYSTEM && arg_runtime_watchdog > 0) watchdog_set_timeout(&arg_runtime_watchdog); - if (arg_timer_slack_nsec != (nsec_t) -1) + if (arg_timer_slack_nsec != NSEC_INFINITY) if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0) log_error("Failed to adjust timer slack: %m");