diff options
author | Etienne Brateau <etienne.brateau@gmail.com> | 2022-01-19 20:29:42 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-01-20 00:30:52 +0100 |
commit | 44852507c56c05e6ad45b0f99a9cd20d4ae3a2bf (patch) | |
tree | 70efa5d83ba070e3fca4033e8e69f9a759816ff4 /libdiskfs | |
parent | b03d5ada9d46a990e944a072ec9a1ba9e769f7bb (diff) | |
download | hurd-44852507c56c05e6ad45b0f99a9cd20d4ae3a2bf.tar.gz hurd-44852507c56c05e6ad45b0f99a9cd20d4ae3a2bf.tar.bz2 hurd-44852507c56c05e6ad45b0f99a9cd20d4ae3a2bf.zip |
libdiskfs: improve asserts and remove a sign compare warning
Message-Id: <20220119192945.36654-4-etienne.brateau@gmail.com>
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/boot-start.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |