[PATCH 2/2] ipcpd: Remove signal handler from ipcp.h

  • From: Dimitri Staessens <dimitri.staessens@xxxxxxxx>
  • To: ouroboros@xxxxxxxxxxxxx
  • Date: Mon, 2 Apr 2018 08:19:55 +0200

The signal handler is completely embedded in the source file. There
was no more need to call it from elsewhere.

Signed-off-by: Dimitri Staessens <dimitri.staessens@xxxxxxxx>
---
 src/ipcpd/ipcp.c | 7 ++++---
 src/ipcpd/ipcp.h | 6 ------
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 8ad2992..cd144f1 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -44,6 +44,7 @@
 
 #include "ipcp.h"
 
+#include <signal.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <stdlib.h>
@@ -59,9 +60,9 @@ struct cmd {
         int              fd;
 };
 
-void ipcp_sig_handler(int         sig,
-                      siginfo_t * info,
-                      void *      c)
+static void ipcp_sig_handler(int         sig,
+                             siginfo_t * info,
+                             void *      c)
 {
         (void) c;
 
diff --git a/src/ipcpd/ipcp.h b/src/ipcpd/ipcp.h
index 3771c1e..5417fc7 100644
--- a/src/ipcpd/ipcp.h
+++ b/src/ipcpd/ipcp.h
@@ -32,7 +32,6 @@
 
 #include <pthread.h>
 #include <time.h>
-#include <signal.h>
 
 enum ipcp_state {
         IPCP_NULL = 0,
@@ -127,11 +126,6 @@ int             ipcp_wait_state(enum ipcp_state         
state,
 int             ipcp_parse_arg(int    argc,
                                char * argv[]);
 
-/* Handle shutdown of IPCP */
-void            ipcp_sig_handler(int         sig,
-                                 siginfo_t * info,
-                                 void *      c);
-
 /* Helper functions for directory entries, could be moved */
 uint8_t *       ipcp_hash_dup(const uint8_t * hash);
 
-- 
2.16.3


Other related posts:

  • » [PATCH 2/2] ipcpd: Remove signal handler from ipcp.h - Dimitri Staessens