git: 3a54d200ae87 - stable/14 - makefs cd9660: Unexpand a few TAILQ macros

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 03 Jan 2024 17:50:03 UTC
The branch stable/14 has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=3a54d200ae8773f263281fcc2075e7dcebf3d3fc

commit 3a54d200ae8773f263281fcc2075e7dcebf3d3fc
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-11-15 02:35:27 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-01-03 17:43:48 +0000

    makefs cd9660: Unexpand a few TAILQ macros
    
    Reviewed by:    imp, emaste
    Differential Revision:  https://reviews.freebsd.org/D42580
    
    (cherry picked from commit c06962057bedb3f1ed8c3560c1d1147dbf04ba68)
---
 usr.sbin/makefs/cd9660.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/makefs/cd9660.c b/usr.sbin/makefs/cd9660.c
index cc56421a873c..7ce9a3b6cbb2 100644
--- a/usr.sbin/makefs/cd9660.c
+++ b/usr.sbin/makefs/cd9660.c
@@ -1516,10 +1516,10 @@ cd9660_generate_path_table(iso9660_disk *diskStructure)
 	TAILQ_INSERT_HEAD(&pt_head, n, ptq);
 
 	/* Breadth-first traversal of file structure */
-	while (pt_head.tqh_first != 0) {
-		n = pt_head.tqh_first;
+	while (!TAILQ_EMPTY(&pt_head)) {
+		n = TAILQ_FIRST(&pt_head);
 		dirNode = n->node;
-		TAILQ_REMOVE(&pt_head, pt_head.tqh_first, ptq);
+		TAILQ_REMOVE(&pt_head, n, ptq);
 		free(n);
 
 		/* Update the size */