From: Christian Grothoff Date: Wed, 12 Jan 2011 09:20:14 +0000 (+0000) Subject: fixes X-Git-Tag: initial-import-from-subversion-38251~19335 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=14839ad22bf671382d464c493d82e6ee0c629c07;p=oweals%2Fgnunet.git fixes --- diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index feb30deb6..7ac2915b4 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c @@ -138,7 +138,7 @@ Dump(u8 * pu8, int nLength) void -usage(void) +usage() { printf( "Usage: wlan-hwd [options] \n\nOptions\n" @@ -397,25 +397,18 @@ int ieee80211_radiotap_iterator_next( #define FIFO_FILE2 "/tmp/MYFIFOout" #define MAXLINE 20 -int first; -int closeprog = 0; +static int first; +static int closeprog; -void sigfunc(int sig) +static void +sigfunc(int sig) { - - if(sig != SIGINT || sig != SIGTERM || sig != SIGKILL) - return; - else - { - closeprog = 1; - - unlink(FIFO_FILE1); - unlink(FIFO_FILE2); - - } + closeprog = 1; + unlink(FIFO_FILE1); + unlink(FIFO_FILE2); } -struct sendbuf{ +struct sendbuf { int pos; int size; char buf[MAXLINE * 2]; @@ -517,9 +510,8 @@ testmode(int argc, char *argv[]) fdpin = fileno(fpin); fdpout = fileno(fpout); - signal(SIGINT, sigfunc); - signal(SIGTERM, sigfunc); - signal(SIGKILL, sigfunc); + signal(SIGINT, &sigfunc); + signal(SIGTERM, &sigfunc); char readbuf[MAXLINE]; int readsize = 0;