diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-08-10 16:33:02 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-06-23 01:07:59 +0200 |
commit | 19b761a097041c2b7adb803fd755940ca2631f13 (patch) | |
tree | 359766b983a9621501323edaf7040a88a241dcd5 /src/basic/random-util.c | |
parent | meson: merge two similar loops for unit files (diff) | |
download | systemd-19b761a097041c2b7adb803fd755940ca2631f13.tar.xz systemd-19b761a097041c2b7adb803fd755940ca2631f13.zip |
tree-wide: getpid() → getpid_cached()
This doesn't really matter, but let's be systematic and prefer
getpid_cached() in our codebase.
Diffstat (limited to 'src/basic/random-util.c')
-rw-r--r-- | src/basic/random-util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/random-util.c b/src/basic/random-util.c index 98bcc7444c..9a7d3480c0 100644 --- a/src/basic/random-util.c +++ b/src/basic/random-util.c @@ -26,6 +26,7 @@ #include "missing_syscall.h" #include "missing_threads.h" #include "parse-util.h" +#include "process-util.h" #include "random-util.h" #include "sha256.h" #include "time-util.h" @@ -48,7 +49,7 @@ static void fallback_random_bytes(void *p, size_t n) { .call_id = fallback_counter++, .stamp_mono = now(CLOCK_MONOTONIC), .stamp_real = now(CLOCK_REALTIME), - .pid = getpid(), + .pid = getpid_cached(), .tid = gettid(), }; |