summaryrefslogtreecommitdiff
path: root/usr.bin/tftp/main.c
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2001-07-31 14:32:16 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2001-07-31 14:32:16 +0000
commit7e869dd08f73eb663a8c4425642b53a970c07585 (patch)
treea02a8c47bc41eb14abe73792f49caf39d68aaff9 /usr.bin/tftp/main.c
parent6486bc2f1faff9954cb6ccfa3cf8281947133020 (diff)
o) better struct handling;
o) use __progname in openlog(3); o) better ERROR packets handling; millert@ ok
Diffstat (limited to 'usr.bin/tftp/main.c')
-rw-r--r--usr.bin/tftp/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c
index 35bb9ad673d..fc378f6039b 100644
--- a/usr.bin/tftp/main.c
+++ b/usr.bin/tftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.7 2001/07/17 02:23:59 pvalchev Exp $ */
+/* $OpenBSD: main.c,v 1.8 2001/07/31 14:32:15 mpech Exp $ */
/* $NetBSD: main.c,v 1.6 1995/05/21 16:54:10 mycroft Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: main.c,v 1.7 2001/07/17 02:23:59 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.8 2001/07/31 14:32:15 mpech Exp $";
#endif /* not lint */
/* Many bug fixes are from Jim Guyton <guyton@rand-unix> */
@@ -149,7 +149,7 @@ struct cmd cmdtab[] = {
{ "rexmt", xhelp, setrexmt },
{ "timeout", ihelp, settimeout },
{ "?", hhelp, help },
- { 0 }
+ { NULL, NULL, NULL }
};
struct cmd *getcmd();
@@ -245,7 +245,7 @@ struct modes {
{ "image", "octet" },
{ "octet", "octet" },
/* { "mail", "mail" }, */
- { 0, 0 }
+ { NULL, NULL }
};
void
@@ -261,7 +261,7 @@ modecmd(argc, argv)
return;
}
if (argc == 2) {
- for (p = modes; p->m_name; p++)
+ for (p = modes; p->m_name != NULL; p++)
if (strcmp(argv[1], p->m_name) == 0)
break;
if (p->m_name) {
@@ -274,7 +274,7 @@ modecmd(argc, argv)
printf("usage: %s [", argv[0]);
sep = " ";
- for (p = modes; p->m_name; p++) {
+ for (p = modes; p->m_name != NULL; p++) {
printf("%s%s", sep, p->m_name);
if (*sep == ' ')
sep = " | ";
@@ -710,7 +710,7 @@ help(argc, argv)
if (argc == 1) {
printf("Commands may be abbreviated. Commands are:\n\n");
- for (c = cmdtab; c->name; c++)
+ for (c = cmdtab; c->name != NULL; c++)
printf("%-*s\t%s\n", (int)HELPINDENT, c->name, c->help);
return;
}