diff options
author | Sami Kerola | 2017-02-11 21:23:26 +0100 |
---|---|---|
committer | Karel Zak | 2017-02-20 12:58:49 +0100 |
commit | 87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3 (patch) | |
tree | 513541cfa347d7fc66e50137603489cb195c86de /libuuid | |
parent | cfdisk: avoid use of VLA in combination with sizeof() [smatch scan] (diff) | |
download | kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.tar.gz kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.tar.xz kernel-qcow2-util-linux-87918040658f2fa9b1bf78f1f8f4f5c065a2e3a3.zip |
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 <kerolasa@iki.fi>
Diffstat (limited to 'libuuid')
-rw-r--r-- | libuuid/src/gen_uuid.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); } /* |