summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2005-11-29 13:13:05 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2005-11-29 13:13:05 +0000
commit6c317b329562fe898737fe3c7b516922e2f075f4 (patch)
tree2a00db0de3474e413567751c0d9d9f00a7068e16
parentec0aaa228376677bbac250eb75e3c61690e46530 (diff)
downloadcanutils-6c317b329562fe898737fe3c7b516922e2f075f4.tar.gz
* random cleanups
git-svn-id: https://iocaste.extern.pengutronix.de/svn/canutils/trunks/canutils-1.0-trunk@53 5fd5a299-6ef2-0310-aa18-8b01d7c39d8c
-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'},