Module: kamailio
Branch: master
Commit: b6d51afb3637a0cffefdc41285d1bb79ea078d77
URL: 
https://github.com/kamailio/kamailio/commit/b6d51afb3637a0cffefdc41285d1bb79ea078d77

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2025-10-13T10:25:41+02:00

core: format cli long options structure

---

Modified: src/main.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/b6d51afb3637a0cffefdc41285d1bb79ea078d77.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b6d51afb3637a0cffefdc41285d1bb79ea078d77.patch

---

diff --git a/src/main.c b/src/main.c
index 7af4478bd23..d42655a2608 100644
--- a/src/main.c
+++ b/src/main.c
@@ -2221,8 +2221,11 @@ int main(int argc, char **argv)
        int option_index = 0;
 
 #define KARGOPTVAL 1024
-       static struct option long_options[] = {/* long options with short 
variant */
-                       {"help", no_argument, 0, 'h'}, {"version", no_argument, 
0, 'v'},
+       /* clang-format off */
+       static struct option long_options[] = {
+                       /* long options with short variant */
+                       {"help", no_argument, 0, 'h'},
+                       {"version", no_argument, 0, 'v'},
                        /* long options without short variant */
                        {"alias", required_argument, 0, KARGOPTVAL},
                        {"subst", required_argument, 0, KARGOPTVAL + 1},
@@ -2236,7 +2239,10 @@ int main(int argc, char **argv)
                        {"cfg-print", no_argument, 0, KARGOPTVAL + 9},
                        {"atexit", required_argument, 0, KARGOPTVAL + 10},
                        {"all-errors", no_argument, 0, KARGOPTVAL + 11},
-                       {"iuid", required_argument, 0, KARGOPTVAL + 12}, {0, 0, 
0, 0}};
+                       {"iuid", required_argument, 0, KARGOPTVAL + 12},
+                       {0, 0, 0, 0}
+               };
+       /* clang-format on */
 
        if(argc > 1) {
                /* checks for common wrong arguments */

_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to