From: "Abner Chang" <abner.chang@hpe.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Wang, Nickle (Server BIOS)" <nickle.wang@hpe.com>
Cc: "Chang, Abner (HPS SW/FW Technologist)" <abner.chang@hpe.com>
Subject: Re: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Do not create attribute for NULL object
Date: Thu, 21 Apr 2022 04:57:18 +0000 [thread overview]
Message-ID: <PH0PR84MB164762BC6D25B8FC73C6807FFFF49@PH0PR84MB1647.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <16E7CAFFF6B9F010.23874@groups.io>
I will merge it. Thanks
Reviewed-by: Abner Chang <abner.chang@hpe.com>
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Wang,
> Nickle (Server BIOS)
> Sent: Thursday, April 21, 2022 11:16 AM
> To: devel@edk2.groups.io
> Cc: Wang, Nickle (Server BIOS) <nickle.wang@hpe.com>; Chang, Abner (HPS
> SW/FW Technologist) <abner.chang@hpe.com>
> Subject: [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg:
> Do not create attribute for NULL object
>
> 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 <nickle.wang@hpe.com>
> Cc: Abner Chang <abner.chang@hpe.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 624314a8ec..02e4c50c5f 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
>
> @@ -795,7 +795,6 @@ RedfishCS_status GetRedfishPropertyVague (void
> *Cs, json_t *JsonObj, char *Key,
> RedfishCS_status InsertJsonStringObj (json_t *ParentJsonObj, char *Key,
> RedfishCS_char *StringValue)
> {
> json_t *JsonValue;
> - RedfishCS_char NullStr[] = "";
> RedfishCS_char *InsertStr;
>
> InsertStr = StringValue;
> @@ -803,7 +802,7 @@ RedfishCS_status InsertJsonStringObj (json_t
> *ParentJsonObj, char *Key, RedfishC
> return RedfishCS_status_invalid_parameter;
> }
> if (InsertStr == (char *)NULL) {
> - InsertStr = NullStr;
> + return RedfishCS_status_success;
> }
> JsonValue = json_string(InsertStr);
> if (JsonValue == NULL) {
> --
> 2.32.0.windows.2
>
>
>
>
>
next parent reply other threads:[~2022-04-21 4:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <16E7CAFFF6B9F010.23874@groups.io>
2022-04-21 4:57 ` Abner Chang [this message]
[not found] ` <16E7D08A11B54075.23693@groups.io>
2022-04-21 5:47 ` [edk2-devel] [edk2-staging][PATCH] edk2-staging/RedfishClientPkg: Do not create attribute for NULL object Abner Chang
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=PH0PR84MB164762BC6D25B8FC73C6807FFFF49@PH0PR84MB1647.NAMPRD84.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