[v2,2/2] telemetry: correct json empty dictionaries

Message ID 20231224220201.762377-2-jonathan.erb@threater.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v2,1/2] telemetry: correct json empty dictionaries |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Jonathan Erb Dec. 24, 2023, 10:02 p.m. UTC
  Fix use of incorrect enum name.

Signed-off-by: Jonathan Erb <jonathan.erb@threater.com>
---
 lib/telemetry/telemetry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bruce Richardson Jan. 8, 2024, 11:02 a.m. UTC | #1
On Sun, Dec 24, 2023 at 05:02:01PM -0500, Jonathan Erb wrote:
> Fix use of incorrect enum name.
> 
> Signed-off-by: Jonathan Erb <jonathan.erb@threater.com>

Please merge this fix into patch 1, so we only have a single commit to the
repo.

Thanks,
/Bruce

> ---
>  lib/telemetry/telemetry.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
> index 0788a32210..eef4ac7bb7 100644
> --- a/lib/telemetry/telemetry.c
> +++ b/lib/telemetry/telemetry.c
> @@ -169,7 +169,7 @@ container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
>  		d->type != TEL_ARRAY_INT && d->type != TEL_ARRAY_STRING)
>  		return snprintf(out_buf, buf_len, "null");
>  
> -	if (d->type == RTE_TEL_DICT)
> +	if (d->type == TEL_DICT)
>  		used = rte_tel_json_empty_obj(out_buf, buf_len, 0);
>  	else
>  		used = rte_tel_json_empty_array(out_buf, buf_len, 0);
> -- 
> 2.34.1
>
  

Patch

diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
index 0788a32210..eef4ac7bb7 100644
--- a/lib/telemetry/telemetry.c
+++ b/lib/telemetry/telemetry.c
@@ -169,7 +169,7 @@  container_to_json(const struct rte_tel_data *d, char *out_buf, size_t buf_len)
 		d->type != TEL_ARRAY_INT && d->type != TEL_ARRAY_STRING)
 		return snprintf(out_buf, buf_len, "null");
 
-	if (d->type == RTE_TEL_DICT)
+	if (d->type == TEL_DICT)
 		used = rte_tel_json_empty_obj(out_buf, buf_len, 0);
 	else
 		used = rte_tel_json_empty_array(out_buf, buf_len, 0);