summaryrefslogtreecommitdiff
path: root/usr.bin/lock/lock.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-26 02:35:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-04-26 02:35:09 +0000
commitffb2eedf28e4393c1603ebfd4a93a1c9504e2819 (patch)
treea47139a05f9605959e9105945606c2098bbd7881 /usr.bin/lock/lock.c
parenteb302be1b8e5764c05c46152fab25ba493c9d3b2 (diff)
pleasing lint, without displeasing future developers
Diffstat (limited to 'usr.bin/lock/lock.c')
-rw-r--r--usr.bin/lock/lock.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/lock/lock.c b/usr.bin/lock/lock.c
index e4d7f79cc35..1ffa26a885f 100644
--- a/usr.bin/lock/lock.c
+++ b/usr.bin/lock/lock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lock.c,v 1.22 2006/04/26 02:32:41 deraadt Exp $ */
+/* $OpenBSD: lock.c,v 1.23 2006/04/26 02:35:08 deraadt Exp $ */
/* $NetBSD: lock.c,v 1.8 1996/05/07 18:32:31 jtc Exp $ */
/*
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: lock.c,v 1.22 2006/04/26 02:32:41 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: lock.c,v 1.23 2006/04/26 02:35:08 deraadt Exp $";
#endif /* not lint */
/*
@@ -121,7 +121,7 @@ main(int argc, char *argv[])
usemine = 1;
break;
case 't':
- sectimeout = strtonum(optarg, 1, INT_MAX, &errstr);
+ sectimeout = (int)strtonum(optarg, 1, INT_MAX, &errstr);
if (errstr)
errx(1, "timeout %s: %s", errstr, optarg);
break;
@@ -214,8 +214,9 @@ main(int argc, char *argv[])
exit(0);
}
+/*ARGSUSED*/
void
-hi(int dummy)
+hi(int signo)
{
char buf[1024], buf2[1024];
time_t now;
@@ -227,13 +228,14 @@ hi(int dummy)
(void)snprintf(buf2, sizeof buf2, " timeout in %d:%d minutes",
(nexttime - now) / 60, (nexttime - now) % 60);
}
- snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n",
+ (void)snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n",
__progname, buf2);
(void) write(STDERR_FILENO, buf, strlen(buf));
}
+/*ARGSUSED*/
void
-bye(int dummy)
+bye(int signo)
{
if (!no_timeout)