This change:
- Removes the macro aliasing lock_info_sort to lis
- Moves lock_info_sort before lip() to eliminate the need for a forward 
declaration
- Updates the call in lip() to refer to lock_info_sort directly

The result is a cleaner and more straightforward structure without changing 
behavior which also fixes a compiler warning.
---
 kern/lock_mon.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/kern/lock_mon.c b/kern/lock_mon.c
index 3ca4592c..edc8ae55 100644
--- a/kern/lock_mon.c
+++ b/kern/lock_mon.c
@@ -51,8 +51,6 @@
 #include <ddb/db_sym.h>
 #include <ddb/db_output.h>
 
-static void lis(int arg, int abs, int count);
-
 def_simple_lock_data(, kdb_lock)
 def_simple_lock_data(, printf_lock)
 
@@ -169,12 +167,6 @@ decl_simple_lock_data(, *lock)
        }
 }
 
-void lip(void) {
-       lis(4, 1, 0);
-}
-
-#define lock_info_sort lis
-
 static void lock_info_sort(int arg, int abs, int count)
 {
        struct lock_info *li, mean;
@@ -251,6 +243,10 @@ static void lock_info_sort(int arg, int abs, int count)
        print_lock_info(&mean);
 }
 
+void lip(void) {
+       lock_info_sort(4, 1, 0);
+}
+
 #define lock_info_clear lic
 
 void lock_info_clear(void)
-- 
2.40.1


Reply via email to