From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5870F223522B4 for ; Tue, 27 Feb 2018 18:43:25 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 18:49:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,403,1515484800"; d="scan'208";a="20863994" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga008.fm.intel.com with ESMTP; 27 Feb 2018 18:49:31 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 18:49:31 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 27 Feb 2018 18:49:30 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.253]) with mapi id 14.03.0319.002; Wed, 28 Feb 2018 10:49:28 +0800 From: "Gao, Liming" To: "Marvin.Haeuser@outlook.com" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" Thread-Topic: [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary. Thread-Index: AQHTr+qdV86YEVqNI0ubZW7MC9x1paO5HZYQ Date: Wed, 28 Feb 2018 02:49:28 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1D47DC@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 02:43:25 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Please also update the one in IntelFrameworkPkg UefiLib. > -----Original Message----- > From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] > Sent: Wednesday, February 28, 2018 12:47 AM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Gao, Liming > Subject: [PATCH] MdePkg/UefiLib: Add 'OUT' decorator where necessary. >=20 > The functions AddUnicodeString() and AddUnicodeString2() might return > a new value into their parameter UnicodeStringTable, hence add the > appropiate 'OUT' decorator. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marvin Haeuser > --- > MdePkg/Library/UefiLib/UefiLib.c | 18 +++++++++--------- > MdePkg/Include/Library/UefiLib.h | 18 +++++++++--------- > 2 files changed, 18 insertions(+), 18 deletions(-) >=20 > diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/Ue= fiLib.c > index f1a3f1c7af05..ba449a1c34ce 100644 > --- a/MdePkg/Library/UefiLib/UefiLib.c > +++ b/MdePkg/Library/UefiLib/UefiLib.c > @@ -888,10 +888,10 @@ LookupUnicodeString2 ( > EFI_STATUS > EFIAPI > AddUnicodeString ( > - IN CONST CHAR8 *Language, > - IN CONST CHAR8 *SupportedLanguages, > - IN EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > - IN CONST CHAR16 *UnicodeString > + IN CONST CHAR8 *Language, > + IN CONST CHAR8 *SupportedLanguages, > + IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > + IN CONST CHAR16 *UnicodeString > ) > { > UINTN NumberOfEntries; > @@ -1065,11 +1065,11 @@ AddUnicodeString ( > EFI_STATUS > EFIAPI > AddUnicodeString2 ( > - IN CONST CHAR8 *Language, > - IN CONST CHAR8 *SupportedLanguages, > - IN EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > - IN CONST CHAR16 *UnicodeString, > - IN BOOLEAN Iso639Language > + IN CONST CHAR8 *Language, > + IN CONST CHAR8 *SupportedLanguages, > + IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > + IN CONST CHAR16 *UnicodeString, > + IN BOOLEAN Iso639Language > ) > { > UINTN NumberOfEntries; > diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/Ue= fiLib.h > index 54bc2cc5a334..256498e3fd8d 100644 > --- a/MdePkg/Include/Library/UefiLib.h > +++ b/MdePkg/Include/Library/UefiLib.h > @@ -587,10 +587,10 @@ LookupUnicodeString2 ( > EFI_STATUS > EFIAPI > AddUnicodeString ( > - IN CONST CHAR8 *Language, > - IN CONST CHAR8 *SupportedLanguages, > - IN EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > - IN CONST CHAR16 *UnicodeString > + IN CONST CHAR8 *Language, > + IN CONST CHAR8 *SupportedLanguages, > + IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > + IN CONST CHAR16 *UnicodeString > ); >=20 > /** > @@ -638,11 +638,11 @@ AddUnicodeString ( > EFI_STATUS > EFIAPI > AddUnicodeString2 ( > - IN CONST CHAR8 *Language, > - IN CONST CHAR8 *SupportedLanguages, > - IN EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > - IN CONST CHAR16 *UnicodeString, > - IN BOOLEAN Iso639Language > + IN CONST CHAR8 *Language, > + IN CONST CHAR8 *SupportedLanguages, > + IN OUT EFI_UNICODE_STRING_TABLE **UnicodeStringTable, > + IN CONST CHAR16 *UnicodeString, > + IN BOOLEAN Iso639Language > ); >=20 > /** > -- > 2.16.0.windows.2