Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi Fix condition for ending the pacet read loop.



details:   https://anonhg.NetBSD.org/src/rev/7c12219936ce
branches:  trunk
changeset: 372730:7c12219936ce
user:      nat <nat%NetBSD.org@localhost>
date:      Thu Dec 22 23:06:11 2022 +0000

description:
Fix condition for ending the pacet read loop.

len is unsigned 16 bit so testing for less than zero is not valid.

diffstat:

 sys/dev/scsipi/if_dse.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 249dd405c59e -r 7c12219936ce sys/dev/scsipi/if_dse.c
--- a/sys/dev/scsipi/if_dse.c   Thu Dec 22 22:39:20 2022 +0000
+++ b/sys/dev/scsipi/if_dse.c   Thu Dec 22 23:06:11 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_dse.c,v 1.2 2022/12/22 22:39:20 nat Exp $ */
+/*     $NetBSD: if_dse.c,v 1.3 2022/12/22 23:06:11 nat Exp $ */
 
 /*
  * Driver for DaynaPORT SCSI/Link SCSI-Ethernet
@@ -850,7 +850,7 @@
                        len = peek_packet(data);
                }
 #endif
-               if (len <=0)
+               if (len == 0)
                        break;
 
 #ifdef DSE_DEBUG



Home | Main Index | Thread Index | Old Index