summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2006-04-02 01:00:40 +0000
committerderaadt <deraadt@openbsd.org>2006-04-02 01:00:40 +0000
commit78bbdddca65fbadb81be44993d22b5c936ea25d9 (patch)
tree6c07fb348ab91114dca0effb2cf9066a91e2133c
parentavoid lvalue cast by making local function be unsigned to begin with (diff)
downloadwireguard-openbsd-78bbdddca65fbadb81be44993d22b5c936ea25d9.tar.xz
wireguard-openbsd-78bbdddca65fbadb81be44993d22b5c936ea25d9.zip
a FALLTHROUGH and one size_t cast
-rw-r--r--libexec/login_passwd/login.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/login_passwd/login.c b/libexec/login_passwd/login.c
index 99300cb6693..186c00cb945 100644
--- a/libexec/login_passwd/login.c
+++ b/libexec/login_passwd/login.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: login.c,v 1.8 2005/04/14 18:33:42 biorn Exp $ */
+/* $OpenBSD: login.c,v 1.9 2006/04/02 01:00:40 deraadt Exp $ */
/*-
* Copyright (c) 1995 Berkeley Software Design, Inc. All rights reserved.
@@ -94,6 +94,7 @@ main(int argc, char **argv)
switch (argc - optind) {
case 2:
class = argv[optind + 1];
+ /*FALLTHROUGH*/
case 1:
username = argv[optind];
break;
@@ -119,7 +120,7 @@ main(int argc, char **argv)
mode = 0;
count = -1;
while (++count < sizeof(response) &&
- read(3, &response[count], 1) == 1) {
+ read(3, &response[count], (size_t)1) == (ssize_t)1) {
if (response[count] == '\0' && ++mode == 2)
break;
if (response[count] == '\0' && mode == 1) {