[pisa-src] r1345 - trunk/pisasd/sdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 16:39:47 +0100

Author: tjansen
Date: Tue Oct 27 16:39:46 2009
New Revision: 1345

Log:
Cosmetics: Moved main() to the end of the file. Saves 3 forward declarations.

Modified:
   trunk/pisasd/sdmain.c

Modified: trunk/pisasd/sdmain.c
==============================================================================
--- trunk/pisasd/sdmain.c       Tue Oct 27 16:36:54 2009        (r1344)
+++ trunk/pisasd/sdmain.c       Tue Oct 27 16:39:46 2009        (r1345)
@@ -73,10 +73,6 @@
 /**
  * Prototype declarations of functions.
  */
-static void sd_init(int argc, char *argv[]);
-static void sd_deinit(void);
-static inline void sd_do_main(void);
-
 static void sd_get_cmdargs(int argc, char **argv);
 static void sd_print_usage(char **argv);
 static void sd_print_version(void);
@@ -89,25 +85,6 @@
 extern void sdctx_init();      /* in sdctx.c */
 
 /**
- * The main function of this server daemon.
- *
- * @param argc   number of command arguments
- * @param argv   pointer to the array of command arguments
- */
-int main(int argc, char *argv[])
-{
-       /* Initialize basic settings */
-       sd_init(argc, argv);
-
-       /* get into the main loop */
-       sd_do_main();
-
-       sd_deinit();
-
-       return 0;
-}
-
-/**
  * A connection is removed permanently from the list. Clean up all associated
  * state.
  *
@@ -529,3 +506,22 @@
        pisa_perf_destroy(pisa_perf);
 #endif
 }
+
+/**
+ * The main function of this server daemon.
+ *
+ * @param argc   number of command arguments
+ * @param argv   pointer to the array of command arguments
+ */
+int main(int argc, char *argv[])
+{
+       /* Initialize basic settings */
+       sd_init(argc, argv);
+
+       /* get into the main loop */
+       sd_do_main();
+
+       sd_deinit();
+
+       return 0;
+}

Other related posts:

  • » [pisa-src] r1345 - trunk/pisasd/sdmain.c - Thomas Jansen