diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-16 19:32:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-03-16 19:32:47 +0000 |
commit | a397a40b7c93265cb2ed617a6612f3db999b591c (patch) | |
tree | 496d239526cc99d20c475362d2152ebe207d005c /usr.bin/tip/uucplock.c | |
parent | e50a27ad82d19d68cc60eda00477acb2b2b7a5f3 (diff) |
first pass of cleanup of this mess; ok dhill
Diffstat (limited to 'usr.bin/tip/uucplock.c')
-rw-r--r-- | usr.bin/tip/uucplock.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/usr.bin/tip/uucplock.c b/usr.bin/tip/uucplock.c index 7f4728d00a8..d1581b9c545 100644 --- a/usr.bin/tip/uucplock.c +++ b/usr.bin/tip/uucplock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uucplock.c,v 1.10 2003/06/03 02:56:18 millert Exp $ */ +/* $OpenBSD: uucplock.c,v 1.11 2006/03/16 19:32:46 deraadt Exp $ */ /* $NetBSD: uucplock.c,v 1.7 1997/02/11 09:24:08 mrg Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)uucplock.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: uucplock.c,v 1.10 2003/06/03 02:56:18 millert Exp $"; +static const char rcsid[] = "$OpenBSD: uucplock.c,v 1.11 2006/03/16 19:32:46 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -48,15 +48,14 @@ static const char rcsid[] = "$OpenBSD: uucplock.c,v 1.10 2003/06/03 02:56:18 mil #include <errno.h> #include "pathnames.h" -/* +/* * uucp style locking routines * return: 0 - success - * -1 - failure + * -1 - failure */ int -uu_lock(ttyname) - char *ttyname; +uu_lock(char *ttyname) { int fd, len; char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; @@ -77,7 +76,7 @@ uu_lock(ttyname) return(-1); } len = read(fd, text_pid, sizeof(text_pid)-1); - if(len<=0) { + if (len<=0) { perror(tbuf); (void)close(fd); fprintf(stderr, "Can't read lock file.\n"); @@ -118,8 +117,7 @@ uu_lock(ttyname) } int -uu_unlock(ttyname) - char *ttyname; +uu_unlock(char *ttyname) { char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; |