summaryrefslogtreecommitdiffstats
path: root/RedfishPkg
diff options
context:
space:
mode:
authorAbner Chang <abner.chang@hpe.com>2021-01-29 11:54:11 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-02-24 08:57:32 +0000
commitbd158441d610d7cb7be0df775b73aeb8ad5e5586 (patch)
treec29ec1d6b489a7afb2b3335101b881c03da11ce8 /RedfishPkg
parent5d7b5cd10569f3098c8a51c10a94bf2f6cc45bf5 (diff)
downloadedk2-bd158441d610d7cb7be0df775b73aeb8ad5e5586.tar.gz
edk2-bd158441d610d7cb7be0df775b73aeb8ad5e5586.tar.bz2
edk2-bd158441d610d7cb7be0df775b73aeb8ad5e5586.zip
RedfishPkg/JsonLib: Fix the mistake of removing code by a accident
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>
Diffstat (limited to 'RedfishPkg')
-rw-r--r--RedfishPkg/Library/JsonLib/JsonLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/RedfishPkg/Library/JsonLib/JsonLib.c b/RedfishPkg/Library/JsonLib/JsonLib.c
index 3693299afb..c305a3767f 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;
}