[Olsr-dev] [PATCH v1 28/43] main: invoke olsr_exit at the end of main

Ferry Huberts (spam-protected)
Wed Nov 11 17:22:01 CET 2015


From: Ferry Huberts <(spam-protected)>

To make it explicit that that is the only proper way to exit.
exit() calls are now in the only 2 allowed places in olsrd (not
counting olsrd_switch).

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index 6000ce6..29c0ca6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -465,7 +465,7 @@ int main(int argc, char *argv[]) {
   olsr_scheduler();
 
   /* Like we're ever going to reach this ;-) */
-  return 1;
+  olsr_exit(NULL, 0);
 } /* main */
 
 #ifndef _WIN32
-- 
2.5.0




More information about the Olsr-dev mailing list