diff options
Diffstat (limited to 'lib/jsonrpc.c')
-rw-r--r-- | lib/jsonrpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index 842d1173a..0841ad81d 100644 --- a/lib/jsonrpc.c +++ b/lib/jsonrpc.c @@ -516,10 +516,10 @@ jsonrpc_create(enum jsonrpc_msg_type type, const char *method, static struct json * jsonrpc_create_id(void) { - static atomic_uint next_id = ATOMIC_VAR_INIT(0); + static atomic_count next_id = ATOMIC_COUNT_INIT(0); unsigned int id; - atomic_add(&next_id, 1, &id); + id = atomic_count_inc(&next_id); return json_integer_create(id); } |