Browse Source

geoip: reformat static export structures

Daniel-Constantin Mierla 2 years ago
parent
commit
8a61b4607d
1 changed files with 23 additions and 16 deletions
  1. 23 16
      src/modules/geoip/geoip_mod.c

+ 23 - 16
src/modules/geoip/geoip_mod.c

@@ -45,31 +45,38 @@ static void mod_destroy(void);
 static int w_geoip_match(struct sip_msg *msg, char *str1, char *str2);
 static int geoip_match(sip_msg_t *msg, str *tomatch, str *pvclass);
 
+/* clang-format off */
 static pv_export_t mod_pvs[] = {
-		{{"gip", sizeof("gip") - 1}, PVT_OTHER, pv_get_geoip, 0,
+	{{"gip", sizeof("gip") - 1}, PVT_OTHER, pv_get_geoip, 0,
 				pv_parse_geoip_name, 0, 0, 0},
-		{{0, 0}, 0, 0, 0, 0, 0, 0, 0}};
+	{{0, 0}, 0, 0, 0, 0, 0, 0, 0}
+};
 
 
-static cmd_export_t cmds[] = {{"geoip_match", (cmd_function)w_geoip_match, 2,
-									  fixup_spve_spve, 0, ANY_ROUTE},
-		{0, 0, 0, 0, 0, 0}};
+static cmd_export_t cmds[] = {
+	{"geoip_match", (cmd_function)w_geoip_match, 2,
+		fixup_spve_spve, 0, ANY_ROUTE},
+	{0, 0, 0, 0, 0, 0}
+};
 
 static param_export_t params[] = {
-		{"path", PARAM_STRING, &geoip_path}, {0, 0, 0}};
+	{"path", PARAM_STRING, &geoip_path},
+	{0, 0, 0}
+};
 
 struct module_exports exports = {
-		"geoip",		 /* module name */
-		DEFAULT_DLFLAGS, /* dlopen flags */
-		cmds,			 /* exported functions */
-		params,			 /* exported parameters */
-		0,				 /* RPC method exports */
-		mod_pvs,		 /* exported pseudo-variables */
-		0,				 /* response handling function */
-		mod_init,		 /* module initialization function */
-		0,				 /* per-child init function */
-		mod_destroy		 /* module destroy function */
+	"geoip",		 /* module name */
+	DEFAULT_DLFLAGS, /* dlopen flags */
+	cmds,			 /* exported functions */
+	params,			 /* exported parameters */
+	0,				 /* RPC method exports */
+	mod_pvs,		 /* exported pseudo-variables */
+	0,				 /* response handling function */
+	mod_init,		 /* module initialization function */
+	0,				 /* per-child init function */
+	mod_destroy		 /* module destroy function */
 };
+/* clang-format on */
 
 
 /**