From 03a4d0108f676994f94a4f5e1ec090bc8f388730 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Thu, 6 May 1999 18:50:10 +0000 Subject: [PATCH] Fix a precedence bug in the atapi tape driver. I think it could either write a filemark where it wasn't needed, or neglect to write one at all, depending on how the boolean converted to an int value for the &. --- sys/i386/isa/wst.c | 4 ++-- sys/pc98/pc98/wst.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/i386/isa/wst.c b/sys/i386/isa/wst.c index 5d0827e628e..2f442e376fe 100644 --- a/sys/i386/isa/wst.c +++ b/sys/i386/isa/wst.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wst.c,v 1.18 1999/05/02 21:46:31 peter Exp $ + * $Id: wst.c,v 1.19 1999/05/06 18:44:10 peter Exp $ */ #include "wdc.h" @@ -373,7 +373,7 @@ wstclose(dev_t dev, int flags, int fmt, struct proc *p) wst_write_filemark(t, 0); /* Write filemark if data written to tape */ - if (t->flags & (WST_DATA_WRITTEN | WST_FM_WRITTEN) == WST_DATA_WRITTEN) + if ((t->flags & (WST_DATA_WRITTEN | WST_FM_WRITTEN)) == WST_DATA_WRITTEN) wst_write_filemark(t, WEOF_WRITE_MASK); /* If minor is even rewind on close */ diff --git a/sys/pc98/pc98/wst.c b/sys/pc98/pc98/wst.c index 5d0827e628e..2f442e376fe 100644 --- a/sys/pc98/pc98/wst.c +++ b/sys/pc98/pc98/wst.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wst.c,v 1.18 1999/05/02 21:46:31 peter Exp $ + * $Id: wst.c,v 1.19 1999/05/06 18:44:10 peter Exp $ */ #include "wdc.h" @@ -373,7 +373,7 @@ wstclose(dev_t dev, int flags, int fmt, struct proc *p) wst_write_filemark(t, 0); /* Write filemark if data written to tape */ - if (t->flags & (WST_DATA_WRITTEN | WST_FM_WRITTEN) == WST_DATA_WRITTEN) + if ((t->flags & (WST_DATA_WRITTEN | WST_FM_WRITTEN)) == WST_DATA_WRITTEN) wst_write_filemark(t, WEOF_WRITE_MASK); /* If minor is even rewind on close */