]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
rpc_client: Replace ZERO_STRUCTP with struct assignment
authorVolker Lendecke <vl@samba.org>
Thu, 29 Jul 2021 08:13:37 +0000 (10:13 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 6 Aug 2021 17:22:30 +0000 (17:22 +0000)
Give the compiler simpler hints

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_client/rpc_transport_tstream.c

index 3103fa4603746a96a22c04ebaf27e1efe02d7c4d..3c64d03bb126166319088265c078e600d6ce139d 100644 (file)
@@ -95,10 +95,9 @@ static void rpc_tstream_next_vector_init(
                                struct rpc_tstream_next_vector_state *s,
                                uint8_t *buf, size_t len)
 {
-       ZERO_STRUCTP(s);
-
-       s->buf = buf;
-       s->len = MIN(len, UINT16_MAX);
+       *s = (struct rpc_tstream_next_vector_state) {
+               .buf = buf, .len = MIN(len, UINT16_MAX),
+       };
 }
 
 static int rpc_tstream_next_vector(struct tstream_context *stream,