lib: Use struct initialization in imessaging_client_init()
authorVolker Lendecke <vl@samba.org>
Tue, 27 Feb 2024 14:39:30 +0000 (15:39 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 Mar 2024 09:13:43 +0000 (09:13 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Mar 28 09:13:43 UTC 2024 on atb-devel-224

source4/lib/messaging/messaging.c

index 6d859f77dd4ec71495c01511f97e4248ea2e0b3f..8d76f17367a03375d41dad041ec064a1e9937032 100644 (file)
@@ -823,14 +823,14 @@ struct imessaging_context *imessaging_client_init(TALLOC_CTX *mem_ctx,
                                                  struct loadparm_context *lp_ctx,
                                                struct tevent_context *ev)
 {
-       struct server_id id;
-       ZERO_STRUCT(id);
-       id.pid = getpid();
-       id.task_id = generate_random();
-       id.vnn = NONCLUSTER_VNN;
-
-       /* This is because we are not in the s3 serverid database */
-       id.unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY;
+       struct server_id id = {
+               .pid = getpid(),
+               .task_id = generate_random(),
+               .vnn = NONCLUSTER_VNN,
+
+               /* This is because we are not in the s3 serverid database */
+               .unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY,
+       };
 
        return imessaging_init_discard_incoming(mem_ctx, lp_ctx, id, ev);
 }