diff mbox

[edk2,02/19] OvmfPkg/XenBusDxe: eliminate AsciiStrCpy() calls

Message ID 20161021212737.15974-3-lersek@redhat.com
State Accepted
Commit 02c6760c96b579f6221933ecfb158bbac4575886
Headers show

Commit Message

Laszlo Ersek Oct. 21, 2016, 9:27 p.m. UTC
AsciiStrCpy() is deprecated / disabled under the
DISABLE_NEW_DEPRECATED_INTERFACES feature test macro.

Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: Gary Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---

Notes:
    not used in my setup, testing would be appreciated

 OvmfPkg/XenBusDxe/XenStore.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Gary Lin Oct. 24, 2016, 4:44 a.m. UTC | #1
On Fri, Oct 21, 2016 at 11:27:20PM +0200, Laszlo Ersek wrote:
> AsciiStrCpy() is deprecated / disabled under the

> DISABLE_NEW_DEPRECATED_INTERFACES feature test macro.

> 


Reviewed-by: Gary Lin <glin@suse.com> and Tested-by: Gary Lin <glin@suse.com>


> Cc: Anthony PERARD <anthony.perard@citrix.com>

> Cc: Gary Lin <glin@suse.com>

> Cc: Jordan Justen <jordan.l.justen@intel.com>

> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=166

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

> ---

> 

> Notes:

>     not used in my setup, testing would be appreciated

> 

>  OvmfPkg/XenBusDxe/XenStore.c | 7 ++-----

>  1 file changed, 2 insertions(+), 5 deletions(-)

> 

> diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c

> index fb00e7393bb1..aa3ff7d3017b 100644

> --- a/OvmfPkg/XenBusDxe/XenStore.c

> +++ b/OvmfPkg/XenBusDxe/XenStore.c

> @@ -1298,11 +1298,8 @@ XenStoreTransactionEnd (

>  {

>    CHAR8 AbortStr[2];

>  

> -  if (Abort) {

> -    AsciiStrCpy (AbortStr, "F");

> -  } else {

> -    AsciiStrCpy (AbortStr, "T");

> -  }

> +  AbortStr[0] = Abort ? 'F' : 'T';

> +  AbortStr[1] = '\0';

>  

>    return XenStoreSingle (Transaction, XS_TRANSACTION_END, AbortStr, NULL, NULL);

>  }

> -- 

> 2.9.2

> 

> 

> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c
index fb00e7393bb1..aa3ff7d3017b 100644
--- a/OvmfPkg/XenBusDxe/XenStore.c
+++ b/OvmfPkg/XenBusDxe/XenStore.c
@@ -1298,11 +1298,8 @@  XenStoreTransactionEnd (
 {
   CHAR8 AbortStr[2];
 
-  if (Abort) {
-    AsciiStrCpy (AbortStr, "F");
-  } else {
-    AsciiStrCpy (AbortStr, "T");
-  }
+  AbortStr[0] = Abort ? 'F' : 'T';
+  AbortStr[1] = '\0';
 
   return XenStoreSingle (Transaction, XS_TRANSACTION_END, AbortStr, NULL, NULL);
 }