[0/2] stdlib: Fix and verify heapsort for two-element cases

Message ID 20240116021657.2553198-1-visitorckw@gmail.com
Headers
Series stdlib: Fix and verify heapsort for two-element cases |

Message

Kuan-Wei Chiu Jan. 16, 2024, 2:16 a.m. UTC
  Ensure correct behavior in cases with exactly two elements, and malloc
fails when allocating a buffer. Additionally, adjust the testing
approach to validate the correctness of heapsort for such cases.

Thanks,
Kuan-Wei

Kuan-Wei Chiu (2):
  stdlib: Fix heapsort for cases with exactly two elements
  stdlib: Verify heapsort for two-element cases

 stdlib/qsort.c      | 2 +-
 stdlib/tst-qsort4.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)
  

Comments

Andreas K. Huettel Jan. 17, 2024, 8:06 p.m. UTC | #1
Am Dienstag, 16. Januar 2024, 03:16:55 CET schrieb Kuan-Wei Chiu:
> Ensure correct behavior in cases with exactly two elements, and malloc
> fails when allocating a buffer. Additionally, adjust the testing
> approach to validate the correctness of heapsort for such cases.
> 
> Thanks,
> Kuan-Wei
> 
> Kuan-Wei Chiu (2):
>   stdlib: Fix heapsort for cases with exactly two elements
>   stdlib: Verify heapsort for two-element cases
> 
>  stdlib/qsort.c      | 2 +-
>  stdlib/tst-qsort4.c | 4 +---
>  2 files changed, 2 insertions(+), 4 deletions(-)

OK