summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ax25ipd/ax25ipd.c2
-rw-r--r--ax25mond/ax25mond.c14
-rw-r--r--ax25rtd/ax25rtctl.c24
-rw-r--r--call/call.c50
-rw-r--r--call/menu.c2
5 files changed, 46 insertions, 46 deletions
diff --git a/ax25ipd/ax25ipd.c b/ax25ipd/ax25ipd.c
index cce9a29..65df46a 100644
--- a/ax25ipd/ax25ipd.c
+++ b/ax25ipd/ax25ipd.c
@@ -42,7 +42,7 @@ struct option options[] = {
{"configfile", 1, NULL, 'c'},
{"ttydevice", 1, NULL, 'd'},
{"nofork", 0, NULL, 'f'},
- {0, 0, 0, 0}
+ {NULL, 0, NULL, 0}
};
int main(int argc, char **argv)
diff --git a/ax25mond/ax25mond.c b/ax25mond/ax25mond.c
index c80b7f0..6388af9 100644
--- a/ax25mond/ax25mond.c
+++ b/ax25mond/ax25mond.c
@@ -90,10 +90,10 @@ struct sockaddr *build_sockaddr(const char *name, int *addrlen)
host_name = strcpy(buf, name);
serv_name = strchr(buf, ':');
if (!serv_name)
- return 0;
+ return NULL;
*serv_name++ = 0;
if (!*host_name || !*serv_name)
- return 0;
+ return NULL;
if (!strcmp(host_name, "local") || !strcmp(host_name, "unix")) {
addr.su.sun_family = AF_UNIX;
@@ -113,7 +113,7 @@ struct sockaddr *build_sockaddr(const char *name, int *addrlen)
struct hostent *hp = gethostbyname(host_name);
endhostent();
if (!hp)
- return 0;
+ return NULL;
addr.si.sin_addr.s_addr =
((struct in_addr *) (hp->h_addr))->s_addr;
}
@@ -124,7 +124,7 @@ struct sockaddr *build_sockaddr(const char *name, int *addrlen)
struct servent *sp = getservbyname(serv_name, NULL);
endservent();
if (!sp)
- return 0;
+ return NULL;
addr.si.sin_port = sp->s_port;
}
@@ -324,7 +324,7 @@ int main(int argc, char *argv[])
FD_SET(sock_list[i], &conn_request);
tv.tv_sec = 0;
tv.tv_usec = 0;
- select(highest_sock_fd + 1, &conn_request, 0, 0, &tv);
+ select(highest_sock_fd + 1, &conn_request, NULL, NULL, &tv);
for (i = 0; i < sock_num; i++)
if (FD_ISSET(sock_list[i], &conn_request)) {
conn_list[conn_num] = accept(sock_list[i],
@@ -340,7 +340,7 @@ int main(int argc, char *argv[])
FD_SET(monrx_fd, &monavail);
tv.tv_sec = 0;
tv.tv_usec = 10;
- select(monrx_fd + 1, &monavail, 0, 0, &tv);
+ select(monrx_fd + 1, &monavail, NULL, NULL, &tv);
if (FD_ISSET(monrx_fd, &monavail)) {
monfromlen = sizeof(monfrom);
size =
@@ -371,7 +371,7 @@ int main(int argc, char *argv[])
FD_SET(monrxtx_fd, &monavail);
tv.tv_sec = 0;
tv.tv_usec = 10;
- select(monrxtx_fd + 1, &monavail, 0, 0, &tv);
+ select(monrxtx_fd + 1, &monavail, NULL, NULL, &tv);
if (FD_ISSET(monrxtx_fd, &monavail)) {
monfromlen = sizeof(monfrom);
size =
diff --git a/ax25rtd/ax25rtctl.c b/ax25rtd/ax25rtctl.c
index d54e235..ba3c1ee 100644
--- a/ax25rtd/ax25rtctl.c
+++ b/ax25rtd/ax25rtctl.c
@@ -32,18 +32,18 @@
#include "../pathnames.h"
static const struct option lopts[] = {
- {"add", 1, 0, 'a'},
- {"del", 1, 0, 'd'},
- {"list", 1, 0, 'l'},
- {"expire", 1, 0, 'e'},
- {"save", 0, 0, 's'},
- {"reload", 0, 0, 'r'},
- {"shutdown", 0, 0, 'q'},
- {"Version", 0, 0, 'V'},
- {"help", 0, 0, 'h'},
- {"debug", 0, 0, 'x'},
- {"version", 0, 0, 'v'},
- {NULL, 0, 0, 0}
+ {"add", 1, NULL, 'a'},
+ {"del", 1, NULL, 'd'},
+ {"list", 1, NULL, 'l'},
+ {"expire", 1, NULL, 'e'},
+ {"save", 0, NULL, 's'},
+ {"reload", 0, NULL, 'r'},
+ {"shutdown", 0, NULL, 'q'},
+ {"Version", 0, NULL, 'V'},
+ {"help", 0, NULL, 'h'},
+ {"debug", 0, NULL, 'x'},
+ {"version", 0, NULL, 'v'},
+ {NULL, 0, NULL, 0}
};
static const char *sopts = "a:d:l:e:srqvVh";
diff --git a/call/call.c b/call/call.c
index ae95c14..7e96663 100644
--- a/call/call.c
+++ b/call/call.c
@@ -1269,13 +1269,13 @@ int change_mode(int oldmode, int newmode, wint * wintab, t_win * win_in,
wrefresh(win_out->ptr);
wclear(win_in->ptr);
wrefresh(win_in->ptr);
- wintab->next = 0;
+ wintab->next = NULL;
endwin();
}
if (newmode == SLAVEMODE) {
delwin(win_out->ptr);
delwin(win_in->ptr);
- wintab->next = 0;
+ wintab->next = NULL;
start_slave_mode(wintab, win_in, win_out);
}
break;
@@ -1284,12 +1284,12 @@ int change_mode(int oldmode, int newmode, wint * wintab, t_win * win_in,
if (newmode == RAWMODE) {
wclear(win_out->ptr);
wrefresh(win_out->ptr);
- wintab->next = 0;
+ wintab->next = NULL;
endwin();
}
if (newmode == TALKMODE) {
delwin(win_out->ptr);
- wintab->next = 0;
+ wintab->next = NULL;
start_talk_mode(wintab, win_in, win_out);
}
break;
@@ -1309,7 +1309,7 @@ static void reinit_mode(int mode, wint * wintab, t_win * win_in, t_win * win_out
wrefresh(win_out->ptr);
wclear(win_in->ptr);
/* wrefresh(win_in->ptr); */
- wintab->next = 0;
+ wintab->next = NULL;
endwin();
start_screen(call);
start_talk_mode(wintab, win_in, win_out);
@@ -1318,7 +1318,7 @@ static void reinit_mode(int mode, wint * wintab, t_win * win_in, t_win * win_out
case SLAVEMODE: /* Also fix me. */
wclear(win_out->ptr);
/* wrefresh(win_out->ptr); */
- wintab->next = 0;
+ wintab->next = NULL;
endwin();
start_screen(call);
start_slave_mode(wintab, win_in, win_out);
@@ -2003,29 +2003,29 @@ static int cmd_call(char *call[], int mode, int encoding)
menuitem con[] = {
{"~Reconnect", 'R', M_ITEM, (void *) 0x01},
{"~Exit", 'E', M_ITEM, (void *) 0x02},
- {"\0", 0, M_END, 0}
+ {"\0", 0, M_END, NULL}
};
menuitem fil[] = {
- {"~Open Logfile", 'O', M_ITEM, 0},
- {"~Close Logfile", 'C', M_ITEM, 0},
- {"Send ~Textfile", 'T', M_ITEM, 0},
- {"Send ~Binary", 'B', M_ITEM, 0},
- {"Send ~AutoBin", 'A', M_ITEM, 0},
- {"\0", 0, M_END, 0}
+ {"~Open Logfile", 'O', M_ITEM, NULL},
+ {"~Close Logfile", 'C', M_ITEM, NULL},
+ {"Send ~Textfile", 'T', M_ITEM, NULL},
+ {"Send ~Binary", 'B', M_ITEM, NULL},
+ {"Send ~AutoBin", 'A', M_ITEM, NULL},
+ {"\0", 0, M_END, NULL}
};
menuitem mod[] = {
- {"~Slavemode", 'S', M_ITEM, 0},
- {"~Talkmode", 'T', M_ITEM, 0},
- {"~Rawmode", 'R', M_ITEM, 0},
- {"\0", 0, M_END, 0}
+ {"~Slavemode", 'S', M_ITEM, NULL},
+ {"~Talkmode", 'T', M_ITEM, NULL},
+ {"~Rawmode", 'R', M_ITEM, NULL},
+ {"\0", 0, M_END, NULL}
};
menuitem win[] = {
- {"~Clear", 'C', M_ITEM, 0},
- {"~Resize", 'R', M_ITEM, 0},
- {"\0", 0, M_END, 0}
+ {"~Clear", 'C', M_ITEM, NULL},
+ {"~Resize", 'R', M_ITEM, NULL},
+ {"\0", 0, M_END, NULL}
};
menuitem top[] = {
@@ -2033,7 +2033,7 @@ static int cmd_call(char *call[], int mode, int encoding)
{"~File", 'F', M_P_DWN, fil},
{"~Mode", 'M', M_P_DWN, mod},
{"~Window", 'W', M_P_DWN, win},
- {"\0", 0, M_END, 0}
+ {"\0", 0, M_END, NULL}
};
wint wintab;
@@ -2061,9 +2061,9 @@ static int cmd_call(char *call[], int mode, int encoding)
int upllen = 0;
char *c, *t;
t_gp gp;
- t_win win_in = {0};
- t_win win_out = {0};
- WINDOW *swin = 0;
+ t_win win_in = {};
+ t_win win_out = {};
+ WINDOW *swin = NULL;
int cnt;
int crc = 0;
char s[80];
@@ -2077,7 +2077,7 @@ static int cmd_call(char *call[], int mode, int encoding)
paclen = sizeof(buf);
gp.dwn_cnt = 0;
- wintab.next = 0;
+ wintab.next = NULL;
if ((fd = connect_to(call)) == -1)
return FALSE;
diff --git a/call/menu.c b/call/menu.c
index ff42cba..6a0613f 100644
--- a/call/menu.c
+++ b/call/menu.c
@@ -90,7 +90,7 @@ void winclose(wint * wtab)
}
doupdate();
- lwin->next = 0;
+ lwin->next = NULL;
free(awin);
}