Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame^] | 1 | From a797b79483940ed4adcaa5fe2c40dd0487c7c2c7 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 9 Aug 2022 11:39:08 -0700 |
| 4 | Subject: [PATCH 4/5] Use correct type to store return from flb_kv_item_create |
| 5 | |
| 6 | Fix |
| 7 | error: incompatible pointer to integer conversion assigning to 'int' from 'struct flb_kv *' |
| 8 | |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | plugins/out_stackdriver/stackdriver_conf.c | 4 ++-- |
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/plugins/out_stackdriver/stackdriver_conf.c b/plugins/out_stackdriver/stackdriver_conf.c |
| 15 | index a9a8eb0..e4f969e 100644 |
| 16 | --- a/plugins/out_stackdriver/stackdriver_conf.c |
| 17 | +++ b/plugins/out_stackdriver/stackdriver_conf.c |
| 18 | @@ -176,12 +176,12 @@ static int read_credentials_file(const char *cred_file, struct flb_stackdriver * |
| 19 | |
| 20 | static int parse_configuration_labels(struct flb_stackdriver *ctx) |
| 21 | { |
| 22 | - int ret; |
| 23 | char *p; |
| 24 | flb_sds_t key; |
| 25 | flb_sds_t val; |
| 26 | struct mk_list *head; |
| 27 | struct flb_slist_entry *entry; |
| 28 | + struct flb_kv *ret; |
| 29 | msgpack_object_kv *kv = NULL; |
| 30 | |
| 31 | if (ctx->labels) { |
| 32 | @@ -216,7 +216,7 @@ static int parse_configuration_labels(struct flb_stackdriver *ctx) |
| 33 | flb_sds_destroy(key); |
| 34 | flb_sds_destroy(val); |
| 35 | |
| 36 | - if (ret == -1) { |
| 37 | + if (!ret) { |
| 38 | return -1; |
| 39 | } |
| 40 | } |
| 41 | -- |
| 42 | 2.37.1 |
| 43 | |