]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc: Simplify GUID_zero() with a direct struct return
authorVolker Lendecke <vl@samba.org>
Wed, 18 Aug 2021 04:27:52 +0000 (06:27 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 24 Aug 2021 17:32:28 +0000 (17:32 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
librpc/ndr/uuid.c

index 2c16f5ad81c11681b43b439639b5adfb3a553359..99d1a1be082182e660fc0c0013ce6f89999de76e 100644 (file)
@@ -143,11 +143,7 @@ _PUBLIC_ struct GUID GUID_random(void)
  */
 _PUBLIC_ struct GUID GUID_zero(void)
 {
-       struct GUID guid;
-
-       ZERO_STRUCT(guid);
-
-       return guid;
+       return (struct GUID) { .time_low = 0 };
 }
 
 _PUBLIC_ bool GUID_all_zero(const struct GUID *u)