summaryrefslogtreecommitdiff
path: root/usr.bin/tip
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-07-01 21:47:10 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-07-01 21:47:10 +0000
commit0869f35639d7208ebb459e81091c948b50a9e59a (patch)
tree28f7dfc6797fe89dfdef4d666b6a5cb0b17c1428 /usr.bin/tip
parentff163802eea049d8857c331c715d53b1507e265e (diff)
Nix some warnings.
Diffstat (limited to 'usr.bin/tip')
-rw-r--r--usr.bin/tip/cu.c6
-rw-r--r--usr.bin/tip/tip.c6
-rw-r--r--usr.bin/tip/value.c8
3 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/tip/cu.c b/usr.bin/tip/cu.c
index f3f95333fce..c935acdbdc1 100644
--- a/usr.bin/tip/cu.c
+++ b/usr.bin/tip/cu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cu.c,v 1.33 2010/07/01 21:28:01 nicm Exp $ */
+/* $OpenBSD: cu.c,v 1.34 2010/07/01 21:47:09 nicm Exp $ */
/* $NetBSD: cu.c,v 1.5 1997/02/11 09:24:05 mrg Exp $ */
/*
@@ -152,7 +152,7 @@ getopt:
* The "cu" host name is used to define the
* attributes of the generic dialer.
*/
- (void)snprintf(sbuf, sizeof(sbuf), "cu%ld", vgetnum(BAUDRATE));
+ (void)snprintf(sbuf, sizeof(sbuf), "cu%d", vgetnum(BAUDRATE));
if ((i = hunt(sbuf)) == 0) {
printf("all ports busy\n");
exit(3);
@@ -178,7 +178,7 @@ getopt:
}
vsetnum(VERBOSE, 0);
if (ttysetup(vgetnum(BAUDRATE))) {
- fprintf(stderr, "%s: unsupported speed %ld\n",
+ fprintf(stderr, "%s: unsupported speed %d\n",
__progname, vgetnum(BAUDRATE));
(void)uu_unlock(uucplock);
exit(3);
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c
index 0d18fd87508..8a13a8f2349 100644
--- a/usr.bin/tip/tip.c
+++ b/usr.bin/tip/tip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tip.c,v 1.48 2010/07/01 21:28:01 nicm Exp $ */
+/* $OpenBSD: tip.c,v 1.49 2010/07/01 21:47:09 nicm Exp $ */
/* $NetBSD: tip.c,v 1.13 1997/04/20 00:03:05 mellon Exp $ */
/*
@@ -40,6 +40,8 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include <util.h>
+
#include "tip.h"
#include "pathnames.h"
@@ -117,7 +119,7 @@ main(int argc, char *argv[])
setparity("none"); /* set the parity table */
if (ttysetup(vgetnum(BAUDRATE))) {
- fprintf(stderr, "%s: bad baud rate %ld\n", __progname,
+ fprintf(stderr, "%s: bad baud rate %d\n", __progname,
vgetnum(BAUDRATE));
(void)uu_unlock(uucplock);
exit(3);
diff --git a/usr.bin/tip/value.c b/usr.bin/tip/value.c
index b0dc7995d52..deb2479c374 100644
--- a/usr.bin/tip/value.c
+++ b/usr.bin/tip/value.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: value.c,v 1.26 2010/07/01 21:43:38 nicm Exp $ */
+/* $OpenBSD: value.c,v 1.27 2010/07/01 21:47:09 nicm Exp $ */
/* $NetBSD: value.c,v 1.6 1997/02/11 09:24:09 mrg Exp $ */
/*
@@ -82,9 +82,9 @@ vinit(void)
FILE *fp;
/* Read environment variables. */
- if (cp = getenv("HOME"))
+ if ((cp = getenv("HOME")))
vsetstr(HOME, cp);
- if (cp = getenv("SHELL"))
+ if ((cp = getenv("SHELL")))
vsetstr(SHELL, cp);
/* Read the .tiprc file in the HOME directory. */
@@ -192,7 +192,7 @@ vtoken(char *s)
}
} else if ((cp = strchr(s, '?'))) {
*cp = '\0';
- if (p = vlookup(s)) {
+ if ((p = vlookup(s))) {
vprint(p);
return;
}