From 5db2c35e0606842e2bf8957daaa6a25d65267464 Mon Sep 17 00:00:00 2001 From: Hans Zandbelt Date: Wed, 11 Dec 2024 19:00:14 +0100 Subject: [PATCH] code: remove reduntant parenthesis disable SonarQube Signed-off-by: Hans Zandbelt --- .github/workflows/{sonarqube.yml => sonarqube.yml.save} | 0 src/util.c | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) rename .github/workflows/{sonarqube.yml => sonarqube.yml.save} (100%) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml.save similarity index 100% rename from .github/workflows/sonarqube.yml rename to .github/workflows/sonarqube.yml.save diff --git a/src/util.c b/src/util.c index 9f3af4dc..375c0a7e 100644 --- a/src/util.c +++ b/src/util.c @@ -1209,7 +1209,7 @@ apr_byte_t oidc_util_read_form_encoded_params(request_rec *r, apr_table_t *table const char *val = NULL; const char *p = data; - while ((p) && (*p)) { + while (p && (*p)) { val = ap_getword(r->pool, &p, OIDC_CHAR_AMP); if (val == NULL) break; @@ -1649,7 +1649,7 @@ apr_hash_t *oidc_util_spaced_string_to_hashtable(apr_pool_t *pool, const char *s char *val; const char *data = apr_pstrdup(pool, str); apr_hash_t *result = apr_hash_make(pool); - while ((data) && (*data)) { + while (data && (*data)) { val = ap_getword_white(pool, &data); if (val == NULL) break; @@ -1793,10 +1793,11 @@ apr_byte_t oidc_util_json_merge(request_rec *r, json_t *src, json_t *dst) { * add query encoded parameters to a table */ void oidc_util_table_add_query_encoded_params(apr_pool_t *pool, apr_table_t *table, const char *params) { - char *key = NULL, *value = NULL; + char *key = NULL; + char *value = NULL; const char *v = NULL; const char *p = params; - while ((p) && (*p)) { + while (p && (*p)) { v = ap_getword(pool, &p, OIDC_CHAR_AMP); if (v == NULL) break;