[hipl-commit] [tiny] Rev 3788: hipd: fix variable shadowing in init

  • From: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Sun, 30 May 2010 16:19:25 +0300

Committer: Mircea Gherzan <mircea.gherzan@xxxxxxxxxxxxxx>
Date: 30/05/2010 at 16:19:25
Revision: 3788
Revision-id: mircea.gherzan@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  hipd: fix variable shadowing in init

Modified:
  M  hipd/init.c

=== modified file 'hipd/init.c'
--- hipd/init.c 2010-05-26 21:40:32 +0000
+++ hipd/init.c 2010-05-30 13:19:01 +0000
@@ -1073,11 +1073,11 @@
  *
  * @param signal the signal hipd received from OS
  */
-void hip_close(int signal)
+void hip_close(int sig)
 {
     static int terminate = 0;
 
-    HIP_ERROR("Signal: %d\n", signal);
+    HIP_ERROR("Signal: %d\n", sig);
     terminate++;
 
     /* Close SAs with all peers */
@@ -1089,8 +1089,8 @@
         HIP_DEBUG("Send still once this signal to force daemon exit...\n");
     } else if (terminate > 2) {
         HIP_DEBUG("Terminating daemon.\n");
-        hip_exit(signal);
-        exit(signal);
+        hip_exit(sig);
+        exit(EXIT_SUCCESS);
     }
 }
 
@@ -1100,9 +1100,9 @@
  *
  * @param signal the signal hipd received
  */
-void hip_exit(int signal)
+void hip_exit(int sig)
 {
-    HIP_ERROR("Signal: %d\n", signal);
+    HIP_ERROR("Signal: %d\n", sig);
 
     hip_delete_default_prefix_sp_pair();
     /* Close SAs with all peers */

Other related posts:

  • » [hipl-commit] [tiny] Rev 3788: hipd: fix variable shadowing in init - Mircea Gherzan