From 0e22b29f9e1a4bea4bc8ce268100c2b16087ba50 Mon Sep 17 00:00:00 2001 From: "Liam J. Foy" Date: Thu, 23 Dec 2004 15:17:21 +0000 Subject: [PATCH] - Remove *ttyname() - Remove unnecessary cast ((char)ch -> ch) - Add WARNS 6 and $DragonFly$ tag --- usr.bin/tty/Makefile | 2 ++ usr.bin/tty/tty.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/tty/Makefile b/usr.bin/tty/Makefile index 5b914b23a4..29e6297f9c 100644 --- a/usr.bin/tty/Makefile +++ b/usr.bin/tty/Makefile @@ -1,5 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $DragonFly: src/usr.bin/tty/Makefile,v 1.2 2004/12/23 15:17:21 liamfoy Exp $ PROG= tty +WARNS?= 6 .include diff --git a/usr.bin/tty/tty.c b/usr.bin/tty/tty.c index d804f82834..a2fa4727cc 100644 --- a/usr.bin/tty/tty.c +++ b/usr.bin/tty/tty.c @@ -33,24 +33,24 @@ * @(#) Copyright (c) 1988, 1993 The Regents of the University of California. All rights reserved. * @(#)tty.c 8.1 (Berkeley) 6/6/93 * $FreeBSD: src/usr.bin/tty/tty.c,v 1.4.2.1 2001/07/30 10:16:47 dd Exp $ - * $DragonFly: src/usr.bin/tty/tty.c,v 1.3 2003/10/04 20:36:53 hmp Exp $ + * $DragonFly: src/usr.bin/tty/tty.c,v 1.4 2004/12/23 15:17:21 liamfoy Exp $ */ #include #include #include -static void usage(void); +static void usage(void); int main(int argc, char **argv) { int ch, sflag; - char *t, *ttyname(); + char *t; sflag = 0; while ((ch = getopt(argc, argv, "s")) != -1) - switch((char)ch) { + switch(ch) { case 's': sflag = 1; break; -- 2.41.0