summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--candump.c6
-rw-r--r--cansend.c13
2 files changed, 5 insertions, 14 deletions
diff --git a/candump.c b/candump.c
index a736f5a..bf1514a 100644
--- a/candump.c
+++ b/candump.c
@@ -23,10 +23,10 @@ static int running = 1;
enum
{
VERSION_OPTION = CHAR_MAX + 1,
- FILTER_OPTION = CHAR_MAX + 2,
+ FILTER_OPTION,
};
-void print_usage(char *prg)
+static void print_usage(char *prg)
{
fprintf(stderr, "Usage: %s <can-interface> [Options]\n"
"Options:\n"
@@ -40,7 +40,7 @@ void print_usage(char *prg)
prg, PF_CAN, SOCK_RAW, CAN_PROTO_RAW);
}
-void sigterm(int signo)
+static void sigterm(int signo)
{
running = 0;
}
diff --git a/cansend.c b/cansend.c
index f8afb26..80721c4 100644
--- a/cansend.c
+++ b/cansend.c
@@ -17,14 +17,8 @@
#include <socket-can/can.h>
extern int optind, opterr, optopt;
-static int running = 1;
-void sigterm(int signo)
-{
- running = 0;
-}
-
-void print_usage(char *prg)
+static void print_usage(char *prg)
{
fprintf(stderr, "Usage: %s <can-interface> [Options] <can-msg>\n"
"<can-msg> can consist of up to 8 bytes given as a space separated list\n"
@@ -41,7 +35,7 @@ void print_usage(char *prg)
" -h, --help this help\n"
" --version print version information and exit\n",
prg, PF_CAN, SOCK_RAW, CAN_PROTO_RAW);
-}
+}
enum
{
@@ -58,9 +52,6 @@ int main(int argc, char **argv)
int loopcount = 1, infinite = 0;
struct ifreq ifr;
- signal(SIGTERM, sigterm);
- signal(SIGHUP, sigterm);
-
struct option long_options[] = {
{ "help", no_argument, 0, 'h' },
{ "identifier", required_argument, 0, 'i'},