Skip to content

Commit 6dd5d33

Browse files
Merge pull request #70 from jhofstee/random-noise
Random noise
2 parents 998b039 + 1ed0a0f commit 6dd5d33

File tree

7 files changed

+31
-31
lines changed

7 files changed

+31
-31
lines changed

src/socketcand.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@
4848

4949
#undef DEBUG_RECEPTION
5050

51-
void state_bcm();
52-
void state_raw();
53-
void state_isotp();
54-
void state_control();
51+
void state_bcm(void);
52+
void state_raw(void);
53+
void state_isotp(void);
54+
void state_control(void);
5555
void tcp_quickack(int s);
56-
void state_nobus();
56+
void state_nobus(void);
5757

5858
extern int client_socket;
5959
extern char **interface_names;

src/socketcandcl.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ void sigint(int signum);
6060
int receive_command(int socket, char *buf);
6161
void state_connected();
6262

63-
int server_socket;
64-
int raw_socket;
65-
int port;
66-
int verbose_flag = 0;
67-
int cmd_index = 0;
68-
int more_elements = 0;
69-
int state, previous_state;
70-
char ldev[IFNAMSIZ];
71-
char rdev[IFNAMSIZ];
72-
char buf[MAXLEN];
73-
char cmd_buffer[MAXLEN];
63+
static int server_socket;
64+
static int raw_socket;
65+
static int port;
66+
static int verbose_flag = 0;
67+
static int cmd_index = 0;
68+
static int more_elements = 0;
69+
static int state, previous_state;
70+
static char ldev[IFNAMSIZ];
71+
static char rdev[IFNAMSIZ];
72+
static char buf[MAXLEN];
73+
static char cmd_buffer[MAXLEN];
7474

7575
int main(int argc, char **argv)
7676
{

src/state_bcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
int sc = -1;
3131

32-
void state_bcm()
32+
void state_bcm(void)
3333
{
3434
int i, j, ret;
3535
unsigned long long sec, usec;

src/state_control.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <netinet/in.h>
2020
#include <arpa/inet.h>
2121

22-
void state_control()
22+
void state_control(void)
2323
{
2424
char buf[MAXLEN];
2525
int i, items;

src/state_isotp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
int si = -1;
2828

29-
void state_isotp()
29+
void state_isotp(void)
3030
{
3131
int i, items, ret;
3232

src/state_raw.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323
#include <linux/can.h>
2424
#include <linux/can/raw.h>
2525

26-
int raw_socket;
27-
struct ifreq ifr;
28-
struct sockaddr_can addr;
29-
struct msghdr msg;
30-
struct can_frame frame;
31-
struct iovec iov;
32-
char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))];
33-
struct timeval tv;
34-
struct cmsghdr *cmsg;
35-
36-
void state_raw()
26+
static int raw_socket;
27+
static struct ifreq ifr;
28+
static struct sockaddr_can addr;
29+
static struct msghdr msg;
30+
static struct can_frame frame;
31+
static struct iovec iov;
32+
static char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))];
33+
static struct timeval tv;
34+
static struct cmsghdr *cmsg;
35+
36+
void state_raw(void)
3737
{
3838
char buf[MAXLEN];
3939
int i, ret, items;

src/statistics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
int statistics_ival = 0;
1616

17-
struct timeval last_fired;
17+
static struct timeval last_fired;
1818

1919
void *statistics_loop(void *ptr)
2020
{

0 commit comments

Comments
 (0)