]> git.proxmox.com Git - mirror_edk2.git/commitdiff
RedfishPkg/JsonLib: Fix the mistake of removing code by a accident
authorAbner Chang <abner.chang@hpe.com>
Fri, 29 Jan 2021 03:54:11 +0000 (11:54 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 24 Feb 2021 08:57:32 +0000 (08:57 +0000)
json_string_value() in JsonValueGetAsciiString () is removed by a accident
when clean up the code.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Nickle Wang <nickle.wang@hpe.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
RedfishPkg/Library/JsonLib/JsonLib.c

index 3693299afb55738b1261097316f7ee9d578c6633..c305a3767f1436db7180b2d78a47bc6d9add844a 100644 (file)
@@ -430,10 +430,10 @@ JsonValueGetAsciiString (
   IN    EDKII_JSON_VALUE    Json\r
   )\r
 {\r
-  CHAR8          *AsciiStr;\r
+  CONST CHAR8    *AsciiStr;\r
   UINTN          Index;\r
 \r
-  AsciiStr = (CHAR8 *)  ((json_t *) Json);\r
+  AsciiStr = json_string_value ((json_t *) Json);\r
   if (AsciiStr == NULL) {\r
     return NULL;\r
   }\r