From: "Chang, Abner" <abner.chang@amd.com>
To: Nickle Wang <nicklew@nvidia.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Igor Kulchytskyy <igork@ami.com>
Subject: Re: [edk2-redfish-client][PATCH] RedfishClientPkg: Do not create attribute for NULL object
Date: Mon, 8 May 2023 01:25:22 +0000 [thread overview]
Message-ID: <MN2PR12MB3966D0AB1D9EADA00D3C6895EA719@MN2PR12MB3966.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20230507142854.12107-1-nicklew@nvidia.com>
[AMD Official Use Only - General]
Reviewed-by: Abner Chang <abner.chang@amd.com>
> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Sunday, May 7, 2023 10:29 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [edk2-redfish-client][PATCH] RedfishClientPkg: Do not create
> attribute for NULL object
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> While input object is NULL, do not generate attribute with empty string value.
> This can reduce the size of HTTP context while sending "PATCH" or "POST"
> request to Redfish service.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
> RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c
> b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c
> index 212f0de1..964904a2 100644
> --- a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c
> +++ b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c
> @@ -1,6 +1,6 @@
> /** @file
>
> - (C) Copyright 2018-2021 Hewlett Packard Enterprise Development LP<BR>
> + (C) Copyright 2018-2022 Hewlett Packard Enterprise Development LP<BR>
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -994,7 +994,6 @@ InsertJsonStringObj (
> )
> {
> json_t *JsonValue;
> - RedfishCS_char NullStr[] = "";
> RedfishCS_char *InsertStr;
>
> InsertStr = StringValue;
> @@ -1003,7 +1002,7 @@ InsertJsonStringObj (
> }
>
> if (InsertStr == (char *)NULL) {
> - InsertStr = NullStr;
> + return RedfishCS_status_success;
> }
>
> JsonValue = json_string (InsertStr);
> --
> 2.17.1
prev parent reply other threads:[~2023-05-08 1:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 14:28 [edk2-redfish-client][PATCH] RedfishClientPkg: Do not create attribute for NULL object Nickle Wang
2023-05-08 1:25 ` Chang, Abner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MN2PR12MB3966D0AB1D9EADA00D3C6895EA719@MN2PR12MB3966.namprd12.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox