mirror of
				https://gitlab.com/qemu-project/edk2.git
				synced 2025-10-30 07:56:39 +08:00 
			
		
		
		
	NetworkPkg/Dhcp6Dxe/GoogleTest: Fix init of complex struct
CLANGDWARF generates build error for missing braces when initializing a complex structure. Change initialization of EFI_DHCP6_IA local variable to a call to ZeroMem() instead. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit is contained in:
		 Michael D Kinney
					Michael D Kinney
				
			
				
					committed by
					
						![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
			
				
	
			
			
			![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
						parent
						
							0d26d944d9
						
					
				
				
					commit
					b05c8d7b80
				
			| @ -746,8 +746,9 @@ TEST_F (Dhcp6SeekStsOptionTest, SeekIATAOptionExpectFail) { | ||||
|   UINT32        SearchPattern       = SEARCH_PATTERN; | ||||
|   UINT16        SearchPatternLength = SEARCH_PATTERN_LEN; | ||||
|   UINT16        *Len                = NULL; | ||||
|   EFI_DHCP6_IA  Ia                  = { 0 }; | ||||
|   EFI_DHCP6_IA  Ia; | ||||
|  | ||||
|   ZeroMem (&Ia, sizeof (Ia)); | ||||
|   Ia.Descriptor.Type                = DHCPV6_OPTION_IA_TA; | ||||
|   Ia.IaAddressCount                 = 1; | ||||
|   Ia.IaAddress[0].PreferredLifetime = 0xDEADBEEF; | ||||
| @ -800,8 +801,9 @@ TEST_F (Dhcp6SeekStsOptionTest, SeekIANAOptionExpectSuccess) { | ||||
|   UINT8         *Option             = NULL; | ||||
|   UINT32        SearchPattern       = SEARCH_PATTERN; | ||||
|   UINT16        SearchPatternLength = SEARCH_PATTERN_LEN; | ||||
|   EFI_DHCP6_IA  Ia                  = { 0 }; | ||||
|   EFI_DHCP6_IA  Ia; | ||||
|  | ||||
|   ZeroMem (&Ia, sizeof (Ia)); | ||||
|   Ia.Descriptor.Type                = DHCPV6_OPTION_IA_NA; | ||||
|   Ia.IaAddressCount                 = 1; | ||||
|   Ia.IaAddress[0].PreferredLifetime = 0x11111111; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user