Fix GetNextVariableName implementation

The NameSize has to be set if EFI_BUFFER_TOO_SMALL is returned,
according to the UEFI specs [1]. Moved the NameSize assignment to
align with this.

[1] https://uefi.org/specs/UEFI/2.10/08_Services_Runtime_Services.html#getnextvariablename

Signed-off-by: Bence Balogh <bence.balogh@arm.com>
Change-Id: I5b1238cfb88062778d4bba047ee1ba77e86fd3b1
2 files changed