Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/ibcs2 ttspeedtab() is a function that returns an ...
details: https://anonhg.NetBSD.org/src/rev/08a2a680007f
branches: trunk
changeset: 536874:08a2a680007f
user: simonb <simonb%NetBSD.org@localhost>
date: Mon Sep 23 04:49:32 2002 +0000
description:
ttspeedtab() is a function that returns an int, and returns -1 if
there's an error. Store the result of this function in a signed
variable instead of an unsigned variable before checking if the return
value is greater than zero.
diffstat:
sys/compat/ibcs2/ibcs2_ioctl.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 771da4fb8b60 -r 08a2a680007f sys/compat/ibcs2/ibcs2_ioctl.c
--- a/sys/compat/ibcs2/ibcs2_ioctl.c Mon Sep 23 04:35:41 2002 +0000
+++ b/sys/compat/ibcs2/ibcs2_ioctl.c Mon Sep 23 04:49:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_ioctl.c,v 1.23 2001/11/13 02:08:25 lukem Exp $ */
+/* $NetBSD: ibcs2_ioctl.c,v 1.24 2002/09/23 04:49:32 simonb Exp $ */
/*
* Copyright (c) 1994, 1995 Scott Bartram
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.23 2001/11/13 02:08:25 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.24 2002/09/23 04:49:32 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -217,6 +217,7 @@
struct termios *bt;
struct ibcs2_termios *st;
{
+ int i;
u_long l, r;
l = bt->c_iflag; r = 0;
@@ -267,9 +268,9 @@
if (l & TOSTOP) r |= IBCS2_TOSTOP;
st->c_lflag = r;
- l = ttspeedtab(bt->c_ospeed, sptab);
- if (l >= 0)
- st->c_cflag |= l;
+ i = ttspeedtab(bt->c_ospeed, sptab);
+ if (i >= 0)
+ st->c_cflag |= i;
st->c_cc[IBCS2_VINTR] =
bt->c_cc[VINTR] != _POSIX_VDISABLE ? bt->c_cc[VINTR] : 0;
Home |
Main Index |
Thread Index |
Old Index