From 383259bdcc76504c3d465e384eee2d87affaa864 Mon Sep 17 00:00:00 2001 From: abnormalmaps Date: Wed, 24 Sep 2025 09:48:41 -0400 Subject: [PATCH] Fix typos in 58b66ae Change-Id: I376154cfc825234cdee1788affc9c1a972e6c0c0 --- src/libc/pthread/thread.rs | 2 +- src/mem/allocator.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libc/pthread/thread.rs b/src/libc/pthread/thread.rs index 648d6b00a..1a9ee3a51 100644 --- a/src/libc/pthread/thread.rs +++ b/src/libc/pthread/thread.rs @@ -110,7 +110,7 @@ pub fn pthread_attr_setstacksize( attr: MutPtr, stacksize: GuestUSize, ) -> i32 { - if attr.is_null() || stacksize < PTHREAD_STACK_MIN || stacksize.is_multiple_of(PAGE_SIZE) { + if attr.is_null() || stacksize < PTHREAD_STACK_MIN || !stacksize.is_multiple_of(PAGE_SIZE) { return EINVAL; } check_magic!(env, attr, MAGIC_ATTR); diff --git a/src/mem/allocator.rs b/src/mem/allocator.rs index 66304219d..cfb97469e 100644 --- a/src/mem/allocator.rs +++ b/src/mem/allocator.rs @@ -334,7 +334,7 @@ impl Allocator { } fn align(size: GuestUSize, align: GuestUSize) -> GuestUSize { - if size.is_multiple_of(align) { + if !size.is_multiple_of(align) { size + align - (size % align) } else { size