Fix sign-compare issues
This commit is contained in:
parent
40df2046c0
commit
1fb398f92e
@ -1,11 +1,10 @@
|
|||||||
# $NetBSD: Makefile,v 1.21 2007/05/28 12:06:30 tls Exp $
|
# $NetBSD: Makefile,v 1.22 2009/04/13 04:37:53 lukem Exp $
|
||||||
# @(#)Makefile 8.1 (Berkeley) 7/19/93
|
# @(#)Makefile 8.1 (Berkeley) 7/19/93
|
||||||
|
|
||||||
USE_FORT?= yes # setuid
|
USE_FORT?= yes # setuid
|
||||||
|
|
||||||
PROG= rlogin
|
PROG= rlogin
|
||||||
SRCS= rlogin.c getport.c
|
SRCS= rlogin.c getport.c
|
||||||
WARNS= 3
|
|
||||||
|
|
||||||
.PATH.c: ${.CURDIR}/../rsh
|
.PATH.c: ${.CURDIR}/../rsh
|
||||||
CPPFLAGS+=-I${.CURDIR}/../rsh
|
CPPFLAGS+=-I${.CURDIR}/../rsh
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: rlogin.c,v 1.39 2008/07/21 14:19:25 lukem Exp $ */
|
/* $NetBSD: rlogin.c,v 1.40 2009/04/13 04:37:53 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1983, 1990, 1993
|
* Copyright (c) 1983, 1990, 1993
|
||||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1990, 1993\
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)rlogin.c 8.4 (Berkeley) 4/29/95";
|
static char sccsid[] = "@(#)rlogin.c 8.4 (Berkeley) 4/29/95";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: rlogin.c,v 1.39 2008/07/21 14:19:25 lukem Exp $");
|
__RCSID("$NetBSD: rlogin.c,v 1.40 2009/04/13 04:37:53 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -229,12 +229,12 @@ main(int argc, char *argv[])
|
|||||||
if ((p = getenv("TERM")) != NULL)
|
if ((p = getenv("TERM")) != NULL)
|
||||||
(void)strlcpy(term, p, sizeof(term));
|
(void)strlcpy(term, p, sizeof(term));
|
||||||
len = strlen(term);
|
len = strlen(term);
|
||||||
if (len < (sizeof(term) - 1) && tcgetattr(0, &tty) == 0) {
|
if (len < (int)(sizeof(term) - 1) && tcgetattr(0, &tty) == 0) {
|
||||||
/* start at 2 to include the / */
|
/* start at 2 to include the / */
|
||||||
for (ospeed = i = cfgetospeed(&tty), len2 = 2; i > 9; len2++)
|
for (ospeed = i = cfgetospeed(&tty), len2 = 2; i > 9; len2++)
|
||||||
i /= 10;
|
i /= 10;
|
||||||
|
|
||||||
if (len + len2 < sizeof(term))
|
if (len + len2 < (int)sizeof(term))
|
||||||
(void)snprintf(term + len, len2 + 1, "/%d", ospeed);
|
(void)snprintf(term + len, len2 + 1, "/%d", ospeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -590,7 +590,7 @@ oob(int signo)
|
|||||||
* to send it yet if we are blocked for output and
|
* to send it yet if we are blocked for output and
|
||||||
* our input buffer is full.
|
* our input buffer is full.
|
||||||
*/
|
*/
|
||||||
if (rcvcnt < sizeof(rcvbuf)) {
|
if (rcvcnt < (int)sizeof(rcvbuf)) {
|
||||||
n = read(rem, rcvbuf + rcvcnt,
|
n = read(rem, rcvbuf + rcvcnt,
|
||||||
sizeof(rcvbuf) - rcvcnt);
|
sizeof(rcvbuf) - rcvcnt);
|
||||||
if (n <= 0)
|
if (n <= 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user