git: dd5ed53a2f93 - main - RISC-V: Fix feenableexcept return value

Alex Richardson arichardson at FreeBSD.org
Thu Mar 25 12:07:52 UTC 2021


The branch main has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=dd5ed53a2f93a5a54efe96bed6bbd0f18b6bdbe2

commit dd5ed53a2f93a5a54efe96bed6bbd0f18b6bdbe2
Author:     Alex Richardson <arichardson at FreeBSD.org>
AuthorDate: 2021-03-25 11:15:41 +0000
Commit:     Alex Richardson <arichardson at FreeBSD.org>
CommitDate: 2021-03-25 11:16:20 +0000

    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


More information about the dev-commits-src-all mailing list