The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7462eb81cd5b2ba6b42e13f49c777a474edea308

commit 7462eb81cd5b2ba6b42e13f49c777a474edea308
Author:     Warner Losh <i...@freebsd.org>
AuthorDate: 2025-07-07 20:05:16 +0000
Commit:     Warner Losh <i...@freebsd.org>
CommitDate: 2025-07-07 23:17:01 +0000

    cam: Use bool for done
    
    'done' is a bool, so declare it like one.
    
    Sponsored by:           Netflix
    Reviewed by:            jhb
    Differential Revision:  https://reviews.freebsd.org/D51171
---
 sys/cam/scsi/scsi_xpt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c
index 1dd149b00a87..bef35243af98 100644
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -2183,16 +2183,16 @@ scsi_scan_bus(struct cam_periph *periph, union ccb 
*request_ccb)
                 * Check to see if we scan any further luns.
                 */
                if (next_target) {
-                       int done;
+                       bool done;
 
                        /*
                         * Free the current request path- we're done with it.
                         */
                        xpt_free_path(oldpath);
  hop_again:
-                       done = 0;
+                       done = false;
                        if (scan_info->request_ccb->ccb_h.func_code == 
XPT_SCAN_TGT) {
-                               done = 1;
+                               done = true;
                        } else if (scan_info->cpi->hba_misc & PIM_SEQSCAN) {
                                scan_info->counter++;
                                if (scan_info->counter ==
@@ -2201,12 +2201,12 @@ scsi_scan_bus(struct cam_periph *periph, union ccb 
*request_ccb)
                                }
                                if (scan_info->counter >=
                                    scan_info->cpi->max_target+1) {
-                                       done = 1;
+                                       done = true;
                                }
                        } else {
                                scan_info->counter--;
                                if (scan_info->counter == 0) {
-                                       done = 1;
+                                       done = true;
                                }
                        }
                        if (done) {

Reply via email to