[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 4/7] libdiskfs: improve asserts and remove a sign compare warning
From: |
Etienne Brateau |
Subject: |
[PATCH 4/7] libdiskfs: improve asserts and remove a sign compare warning |
Date: |
Wed, 19 Jan 2022 20:29:42 +0100 |
---
libdiskfs/boot-start.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index 5c4c3248..89d09d65 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -249,7 +249,8 @@ diskfs_start_bootstrap ()
diskfs_kernel_task = MACH_PORT_NULL;
len = snprintf (buf, sizeof buf, "--kernel-task=%lu", kernel_task_name);
- assert_backtrace (len < sizeof buf);
+ assert_backtrace (len > 0);
+ assert_backtrace ((size_t) len < sizeof buf);
/* Insert as second argument. */
err = argz_insert (&exec_argv, &exec_argvlen,
argz_next (exec_argv, exec_argvlen, exec_argv), buf);
--
2.34.1
- [PATCH 1/7] libpager: fix a comparision between signed and unsigned, Etienne Brateau, 2022/01/19
- [PATCH 2/7] libpager: fix assertion unsigned against 0, Etienne Brateau, 2022/01/19
- [PATCH 3/7] libstore: fix type of a counter, Etienne Brateau, 2022/01/19
- [PATCH 4/7] libdiskfs: improve asserts and remove a sign compare warning,
Etienne Brateau <=
- [PATCH 7/7] proc: Fix variable type, Etienne Brateau, 2022/01/19
- [PATCH 6/7] libnetfs: fix type of variable, Etienne Brateau, 2022/01/19
- [PATCH 5/7] libps: fix some signed vs unsigned comparision, Etienne Brateau, 2022/01/19
- Re: [PATCH 1/7] libpager: fix a comparision between signed and unsigned, Samuel Thibault, 2022/01/19