ANSI C; sprintf now returns an int.
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 11:55:31 +0000 (03:55 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 11:55:31 +0000 (03:55 -0800)
SCCS-vsn: usr.bin/tip/cu.c 5.5
SCCS-vsn: usr.bin/tip/tip.c 5.6

usr/src/usr.bin/tip/cu.c
usr/src/usr.bin/tip/tip.c

index 023b952..566ea3c 100644 (file)
@@ -5,7 +5,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)cu.c       5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)cu.c       5.5 (Berkeley) %G%";
 #endif not lint
 
 #include "tip.h"
 #endif not lint
 
 #include "tip.h"
@@ -77,7 +77,8 @@ cumain(argc, argv)
         * The "cu" host name is used to define the
         * attributes of the generic dialer.
         */
         * The "cu" host name is used to define the
         * attributes of the generic dialer.
         */
-       if ((i = hunt(sprintf(sbuf, "cu%d", BR))) == 0) {
+       (void)sprintf(sbuf, "cu%d", BR);
+       if ((i = hunt(sbuf)) == 0) {
                printf("all ports busy\n");
                exit(3);
        }
                printf("all ports busy\n");
                exit(3);
        }
index e779cc4..666f2e6 100644 (file)
@@ -11,7 +11,7 @@ char copyright[] =
 #endif not lint
 
 #ifndef lint
 #endif not lint
 
 #ifndef lint
-static char sccsid[] = "@(#)tip.c      5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)tip.c      5.6 (Berkeley) %G%";
 #endif not lint
 
 /*
 #endif not lint
 
 /*
@@ -36,7 +36,6 @@ int   timeout();
 int    cleanup();
 char   *sname();
 char   PNbuf[256];                     /* This limits the size of a number */
 int    cleanup();
 char   *sname();
 char   PNbuf[256];                     /* This limits the size of a number */
-extern char *sprintf();
 
 main(argc, argv)
        char *argv[];
 
 main(argc, argv)
        char *argv[];
@@ -103,7 +102,8 @@ main(argc, argv)
        for (p = system; *p; p++)
                *p = '\0';
        PN = PNbuf;
        for (p = system; *p; p++)
                *p = '\0';
        PN = PNbuf;
-       system = sprintf(sbuf, "tip%d", BR);
+       (void)sprintf(sbuf, "tip%d", BR);
+       system = sbuf;
 
 notnumber:
        signal(SIGINT, cleanup);
 
 notnumber:
        signal(SIGINT, cleanup);