[edk2-devel] [PATCH] RedfishPkg/JsonLib: Fix the mistake of removing code by a accident

Abner Chang abner.chang at hpe.com
Fri Jan 29 04:19:54 UTC 2021


json_string_value() in JsonValueGetAsciiString () is removed by a accident
when clean up the code.

Signed-off-by: Abner Chang <abner.chang at hpe.com>

Cc: Leif Lindholm <leif at nuviainc.com>
Cc: Nickle Wang <nickle.wang at hpe.com>
Cc: Michael D Kinney <michael.d.kinney at intel.com>
---
 RedfishPkg/Library/JsonLib/JsonLib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/RedfishPkg/Library/JsonLib/JsonLib.c b/RedfishPkg/Library/JsonLib/JsonLib.c
index 34ff381aee..d729e3ec27 100644
--- a/RedfishPkg/Library/JsonLib/JsonLib.c
+++ b/RedfishPkg/Library/JsonLib/JsonLib.c
@@ -430,10 +430,10 @@ JsonValueGetAsciiString (
   IN    EDKII_JSON_VALUE    Json
   )
 {
-  CHAR8          *AsciiStr;
+  CONST CHAR8    *AsciiStr;
   UINTN          Index;
 
-  AsciiStr = (CHAR8 *)  ((json_t *) Json);
+  AsciiStr = json_string_value ((json_t *) Json);
   if (AsciiStr == NULL) {
     return NULL;
   }
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70885): https://edk2.groups.io/g/devel/message/70885
Mute This Topic: https://groups.io/mt/80203694/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list