From bd158441d610d7cb7be0df775b73aeb8ad5e5586 Mon Sep 17 00:00:00 2001 From: Abner Chang Date: Fri, 29 Jan 2021 11:54:11 +0800 Subject: 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 Cc: Leif Lindholm Cc: Nickle Wang Cc: Michael D Kinney Reviewed-by: Liming Gao Reviewed-by: Nickle Wang --- 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 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; } -- cgit v1.2.3