From 39e80d1944a596cfaf066e673001deec31d556da Mon Sep 17 00:00:00 2001
From: Maxim Menshikov <maxim.menshikov@iopsys.eu>
Date: Sun, 17 Sep 2023 00:39:11 +0100
Subject: [PATCH] Style improvements

---
 src/agent_tlv.h    | 11 ++++++-----
 src/qos.c          | 14 +++++++-------
 src/qos.h          |  6 +++---
 src/qos_internal.h | 20 ++++++++++----------
 4 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/src/agent_tlv.h b/src/agent_tlv.h
index 3a2e484d9..84a1f76ae 100644
--- a/src/agent_tlv.h
+++ b/src/agent_tlv.h
@@ -194,10 +194,11 @@ int agent_gen_dpp_bootstrapping_uri_notif(struct agent *a,
 int agent_gen_1905_encap_dpp_tlv(struct agent *a, struct cmdu_buff *frm,
 				 uint8_t *enrollee, uint8_t frametype,
 				 uint16_t framelen, uint8_t *frame);
-int agent_gen_profile2_error_code_tlv(struct agent *a, struct cmdu_buff *frm,
-									  uint8_t reason,
-									  uint8_t bssid[6],
-									  uint32_t spr_id,
-									  uint16_t qmid);
+int agent_gen_profile2_error_code_tlv(struct agent *a,
+                                      struct cmdu_buff *frm,
+                                      uint8_t reason,
+                                      uint8_t bssid[6],
+                                      uint32_t spr_id,
+                                      uint16_t qmid);
 #endif
 #endif /* MAPAGENT_TLV_H */
diff --git a/src/qos.c b/src/qos.c
index 0664632df..dd43f9771 100644
--- a/src/qos.c
+++ b/src/qos.c
@@ -1,9 +1,9 @@
 /*
- * rules.c - rules wrapper functions
+ * qos.c - agent-side QoS implementation
  *
- * Copyright (C) 2019 IOPSYS Software Solutions AB. All rights reserved.
+ * Copyright (C) 2023 IOPSYS Software Solutions AB. All rights reserved.
  *
- * Author: anjan.chanda@iopsys.eu
+ * Author: maxim.menshikov@iopsys.eu
  *
  */
 
@@ -232,10 +232,10 @@ dscp_pcp_conv_result dscp_pcp2qosmap(uint8_t dscp_pcp[64],
 	for (i = 0; i < total_du; ++i) {
 		char pair[TMP_BUF_LEN];
 
-        /*
-         * No need for bounds check - result length can't exceed the buffer
-         * length
-         */
+		/*
+		 * No need for bounds check - result length can't exceed the buffer
+		 * length
+		 */
 		sprintf(pair, "%d,%d,", dscp_up[i][0], dscp_up[i][1]);
 		final_len += strlen(pair);
 		if (final_len > qos_map_len) {
diff --git a/src/qos.h b/src/qos.h
index e37b4f35e..0c9787785 100644
--- a/src/qos.h
+++ b/src/qos.h
@@ -14,10 +14,10 @@
 void qos_rule_free(void *rule);
 void qos_rule_free_all(struct list_head *list);
 int qos_add_dscp_rule(void *a,
-					  struct tlv_spr *spr,
-					  struct ieee1905_dscp_pcp_usr *dscp_pcp);
+                      struct tlv_spr *spr,
+                      struct ieee1905_dscp_pcp_usr *dscp_pcp);
 int qos_del_dscp_rule(void *a,
-					  struct tlv_spr *spr);
+                      struct tlv_spr *spr);
 int qos_apply_dscp_rules(void *a);
 int qos_sync_rules_to_nodes(void *agent);
 int qos_get_rules(void *a);
diff --git a/src/qos_internal.h b/src/qos_internal.h
index 85dede202..a69fa2c3c 100644
--- a/src/qos_internal.h
+++ b/src/qos_internal.h
@@ -62,24 +62,24 @@ enum qos_rule_type {
 
 /* Temporary rule structure which contains both SPR and DSCP parts */
 typedef struct temp_rule {
-    struct list_head        list;  /**< List head */
-    struct tlv_spr          spr;   /**< Service Prioritization Rule */
+	struct list_head        list;  /**< List head */
+	struct tlv_spr          spr;   /**< Service Prioritization Rule */
 	enum   qos_rule_type    type;  /**< Rule Type */
 	union {
 		struct ieee1905_dscp_pcp_usr dscp;    /**< DSCP rule - valid only in
-                                                   case of
-                                                   QOS_RULE_TYPE_DSCP_PCP rule
-                                                   type */
+		                                           case of
+		                                           QOS_RULE_TYPE_DSCP_PCP rule
+		                                           type */
 	};
 } temp_rule;
 
 /* DSCP-PCP -> hostapd format conversion results */
 typedef enum dscp_pcp_conv_result {
-    DSCP_PCP_CONV_RESULT_OK,               /**< Conversion finished well */
-    DSCP_PCP_CONV_RESULT_OK_TOO_MANY_EXC,  /**< Conversion finished well,
-                                                but too many exceptions */
-    DSCP_PCP_CONV_RESULT_TOO_LONG,         /**< Too long result that didn't
-                                                fit the output buffer */
+	DSCP_PCP_CONV_RESULT_OK,               /**< Conversion finished well */
+	DSCP_PCP_CONV_RESULT_OK_TOO_MANY_EXC,  /**< Conversion finished well,
+	                                            but too many exceptions */
+	DSCP_PCP_CONV_RESULT_TOO_LONG,         /**< Too long result that didn't
+	                                            fit the output buffer */
 	DSCP_PCP_CONV_RESULT_FAIL,             /**< Failure producing QoS map */
 } dscp_pcp_conv_result;
 
-- 
GitLab