Make clear that generate_unique_u64() is the only function referencing
it.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
return BVAL(v, 0);
}
-static struct generate_unique_u64_state {
- uint64_t next_value;
- int pid;
-} generate_unique_u64_state;
-
_PUBLIC_ uint64_t generate_unique_u64(uint64_t veto_value)
{
+ static struct generate_unique_u64_state {
+ uint64_t next_value;
+ int pid;
+ } generate_unique_u64_state;
+
int pid = getpid();
if (unlikely(pid != generate_unique_u64_state.pid)) {