From 87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 11 Feb 2017 20:23:26 +0000 Subject: misc: do not use plain 0 as NULL [smatch scan] text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola --- libuuid/src/gen_uuid.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libuuid') diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c index 6d2194ee4..21e361293 100644 --- a/libuuid/src/gen_uuid.c +++ b/libuuid/src/gen_uuid.c @@ -275,12 +275,12 @@ static int get_clock(uint32_t *clock_high, uint32_t *clock_low, if ((last.tv_sec == 0) && (last.tv_usec == 0)) { random_get_bytes(&clock_seq, sizeof(clock_seq)); clock_seq &= 0x3FFF; - gettimeofday(&last, 0); + gettimeofday(&last, NULL); last.tv_sec--; } try_again: - gettimeofday(&tv, 0); + gettimeofday(&tv, NULL); if ((tv.tv_sec < last.tv_sec) || ((tv.tv_sec == last.tv_sec) && (tv.tv_usec < last.tv_usec))) { @@ -446,7 +446,7 @@ static int uuid_generate_time_generic(uuid_t out) { time_t now; if (num > 0) { - now = time(0); + now = time(NULL); if (now > last_time+1) num = 0; } @@ -454,7 +454,7 @@ static int uuid_generate_time_generic(uuid_t out) { num = 1000; if (get_uuid_via_daemon(UUIDD_OP_BULK_TIME_UUID, out, &num) == 0) { - last_time = time(0); + last_time = time(NULL); uuid_unpack(out, &uu); num--; return 0; @@ -477,7 +477,7 @@ static int uuid_generate_time_generic(uuid_t out) { return 0; #endif - return __uuid_generate_time(out, 0); + return __uuid_generate_time(out, NULL); } /* -- cgit v1.2.3-55-g7522