diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-02-03 18:16:35 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-02-03 18:16:35 +0100 |
commit | 86caf09519c702f38552ba4f789b55a562fc29c5 (patch) | |
tree | 8b61fe3a92902fa79aa125d5a0b778f61ff0dab9 /src | |
parent | c05482281c32bd408808b14c5fb03e706e65602d (diff) |
core: use some nice macros where appropriate
Diffstat (limited to 'src')
-rw-r--r-- | src/core/main.c | 12 | ||||
-rw-r--r-- | src/shared/time-util.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/main.c b/src/core/main.c index 02b7c37f8d..0480bc8d43 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1217,11 +1217,11 @@ int main(int argc, char *argv[]) { FDSet *fds = NULL; bool reexecute = false; const char *shutdown_verb = NULL; - dual_timestamp initrd_timestamp = { 0ULL, 0ULL }; - dual_timestamp userspace_timestamp = { 0ULL, 0ULL }; - dual_timestamp kernel_timestamp = { 0ULL, 0ULL }; - dual_timestamp security_start_timestamp = { 0ULL, 0ULL }; - dual_timestamp security_finish_timestamp = { 0ULL, 0ULL }; + dual_timestamp initrd_timestamp = DUAL_TIMESTAMP_NULL; + dual_timestamp userspace_timestamp = DUAL_TIMESTAMP_NULL; + dual_timestamp kernel_timestamp = DUAL_TIMESTAMP_NULL; + dual_timestamp security_start_timestamp = DUAL_TIMESTAMP_NULL; + dual_timestamp security_finish_timestamp = DUAL_TIMESTAMP_NULL; static char systemd[] = "systemd"; bool skip_setup = false; unsigned j; @@ -1230,7 +1230,7 @@ int main(int argc, char *argv[]) { bool queue_default_job = false; bool empty_etc = false; char *switch_root_dir = NULL, *switch_root_init = NULL; - static struct rlimit saved_rlimit_nofile = { 0, 0 }; + struct rlimit saved_rlimit_nofile = RLIMIT_MAKE_CONST(0); const char *error_message = NULL; #ifdef HAVE_SYSV_COMPAT diff --git a/src/shared/time-util.h b/src/shared/time-util.h index fbfbcbffcc..fca8a4db9b 100644 --- a/src/shared/time-util.h +++ b/src/shared/time-util.h @@ -67,7 +67,7 @@ typedef struct dual_timestamp { #define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1) -#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 }) +#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0ULL, 0ULL }) usec_t now(clockid_t clock); |