From dd5ed53a2f93a5a54efe96bed6bbd0f18b6bdbe2 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 25 Mar 2021 11:15:41 +0000 Subject: [PATCH] RISC-V: Fix feenableexcept return value The man page says "The feenableexcept(), fedisableexcept(), and fegetexcept() functions return a bitmap of the exceptions that were unmasked prior to the call.", so we should return zero not -1. Reviewed By: mhorne MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29386 --- lib/msun/riscv/fenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msun/riscv/fenv.h b/lib/msun/riscv/fenv.h index 6c8c2861bc97..f5c56f73b229 100644 --- a/lib/msun/riscv/fenv.h +++ b/lib/msun/riscv/fenv.h @@ -231,7 +231,7 @@ feenableexcept(int __mask __unused) /* No exception traps. */ - return (-1); + return (0); } static inline int