summaryrefslogtreecommitdiffstats
path: root/kiss
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-06-05 01:42:05 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-06-17 17:11:30 +0200
commit5feb3d651dbd1b096a26963bd1dffcfe0a5f9eea (patch)
treeaa82bb7320480efba49b850b21193ecfee963fe3 /kiss
parent1245fbd2a8d60bab7b16b8a1d3c0122fee72f53f (diff)
Remove useless initializations to 0 or NULL.
They only inflate the .data section of the binary. Initializations to FALSE are still left to do. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'kiss')
-rw-r--r--kiss/kissattach.c16
-rw-r--r--kiss/kissnetd.c6
-rw-r--r--kiss/mkiss.c16
-rw-r--r--kiss/net2kiss.c8
4 files changed, 23 insertions, 23 deletions
diff --git a/kiss/kissattach.c b/kiss/kissattach.c
index 49f5ee2..e61eabb 100644
--- a/kiss/kissattach.c
+++ b/kiss/kissattach.c
@@ -33,15 +33,15 @@
#endif
static char *callsign;
-static int speed = 0;
-static int mtu = 0;
+static int speed;
+static int mtu;
static int logging = FALSE;
-static char *progname = NULL;
-static char *kttyname = NULL;
-static char *portname = NULL;
-static char *inetaddr = NULL;
-static int allow_broadcast = 0;
-static int i_am_unix98_pty_master = 0; /* unix98 ptmx support */
+static char *progname;
+static char *kttyname;
+static char *portname;
+static char *inetaddr;
+static int allow_broadcast;
+static int i_am_unix98_pty_master; /* unix98 ptmx support */
static char *kiss_basename(char *s)
{
diff --git a/kiss/kissnetd.c b/kiss/kissnetd.c
index 304aed1..903ee22 100644
--- a/kiss/kissnetd.c
+++ b/kiss/kissnetd.c
@@ -25,7 +25,7 @@
#include <limits.h>
static char *Version = "1.5";
-static int VerboseMode = 0;
+static int VerboseMode;
static int MaxFrameSize = 512;
#define REOPEN_TIMEOUT 30 /* try tio reopen every 10 s */
@@ -43,7 +43,7 @@ struct PortDescriptor {
static struct PortDescriptor *PortList[FD_SETSIZE];
-static int NbPort = 0;
+static int NbPort;
static void Usage(void)
{
@@ -161,7 +161,7 @@ static void ReopenPort(int PortNumber)
static void TickReopen(void)
{
int i;
- static int wrote_info = 0;
+ static int wrote_info;
time_t CurrentTime = time(NULL);
for (i=0; i<NbPort; i++) {
diff --git a/kiss/mkiss.c b/kiss/mkiss.c
index 7cce904..3abcbbd 100644
--- a/kiss/mkiss.c
+++ b/kiss/mkiss.c
@@ -78,9 +78,9 @@
static unsigned char ibuf[SIZE]; /* buffer for input operations */
static unsigned char obuf[SIZE]; /* buffer for kiss_tx() */
-static int crc_errors = 0;
-static int invalid_ports = 0;
-static int return_polls = 0;
+static int crc_errors;
+static int invalid_ports;
+static int return_polls ;
static char *usage_string = "usage: mkiss [-p interval] [-c] [-f] [-h] [-l] [-s speed] [-v] [-x <num_ptmx_devices>] ttyinterface pty ..\n";
@@ -89,7 +89,7 @@ static int dump_report = FALSE;
static int logging = FALSE;
static int crcflag = FALSE;
static int hwflag = FALSE;
-static int pollspeed = 0;
+static int pollspeed;
/* CRC-stuff */
typedef unsigned short int u16;
@@ -114,9 +114,9 @@ struct iface
* the client has to use */
};
-static struct iface *tty = NULL;
-static struct iface *pty[16] = { NULL };
-static int numptys = 0;
+static struct iface *tty;
+static struct iface *pty[16];
+static int numptys;
static void init_crc(void)
{
@@ -143,7 +143,7 @@ static void init_crc(void)
static int poll(int fd, int ports)
{
char buffer[3];
- static int port = 0;
+ static int port;
buffer[0] = FEND;
buffer[1] = POLL | (port << 4);
diff --git a/kiss/net2kiss.c b/kiss/net2kiss.c
index 04b4032..d3b5234 100644
--- a/kiss/net2kiss.c
+++ b/kiss/net2kiss.c
@@ -65,10 +65,10 @@
static int fdif, fdpty;
static struct ifreq ifr;
static char *progname;
-static int verbose = 0;
-static int i_am_unix98_pty_master = 0; /* unix98 ptmx support */
-static char *namepts = NULL; /* name of the unix98 pts slave, which
- * the client has to use */
+static int verbose;
+static int i_am_unix98_pty_master; /* unix98 ptmx support */
+static char *namepts; /* name of the unix98 pts slave, which
+ * the client has to use */
/* --------------------------------------------------------------------- */