ANSI C; sprintf now returns an int.
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 03:33:32 +0000 (19:33 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 23 Oct 1987 03:33:32 +0000 (19:33 -0800)
SCCS-vsn: games/atc/log.c 5.2

usr/src/games/atc/log.c

index 79f4470..a558291 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)log.c      5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)log.c      5.2 (Berkeley) %G%";
 #endif not lint
 
 #include "include.h"
 #endif not lint
 
 #include "include.h"
@@ -38,13 +38,13 @@ timestr(t)
        static char     s[80];
 
        if (DAY(t) > 0)
        static char     s[80];
 
        if (DAY(t) > 0)
-               sprintf(s, "%dd+%02dhrs", DAY(t), HOUR(t));
+               (void)sprintf(s, "%dd+%02dhrs", DAY(t), HOUR(t));
        else if (HOUR(t) > 0)
        else if (HOUR(t) > 0)
-               sprintf(s, "%d:%02d:%02d", HOUR(t), MIN(t), SEC(t));
+               (void)sprintf(s, "%d:%02d:%02d", HOUR(t), MIN(t), SEC(t));
        else if (MIN(t) > 0)
        else if (MIN(t) > 0)
-               sprintf(s, "%d:%02d", MIN(t), SEC(t));
+               (void)sprintf(s, "%d:%02d", MIN(t), SEC(t));
        else if (SEC(t) > 0)
        else if (SEC(t) > 0)
-               sprintf(s, ":%02d", SEC(t));
+               (void)sprintf(s, ":%02d", SEC(t));
        else
                *s = '\0';
 
        else
                *s = '\0';