From: Volker Lendecke Date: Wed, 18 Aug 2021 04:27:52 +0000 (+0200) Subject: librpc: Simplify GUID_zero() with a direct struct return X-Git-Tag: ldb-2.5.0~885 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e2ac224b79574ee07c82e5e58c8ba17c0299b09;p=thirdparty%2Fsamba.git librpc: Simplify GUID_zero() with a direct struct return Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c index 2c16f5ad81c..99d1a1be082 100644 --- a/librpc/ndr/uuid.c +++ b/librpc/ndr/uuid.c @@ -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)