aboutsummaryrefslogtreecommitdiffstats
path: root/imaxabs.c
diff options
context:
space:
mode:
Diffstat (limited to 'imaxabs.c')
-rw-r--r--imaxabs.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/imaxabs.c b/imaxabs.c
index 22d3d10..8100894 100644
--- a/imaxabs.c
+++ b/imaxabs.c
@@ -2,6 +2,16 @@
#include "internal.h"
+void
+liberror_imaxabs_failed(intmax_t i)
+{
+ liberror_set_error_errno("The absolute value of largest negative integer "
+ "cannot be represented as a signed integer",
+ "imaxabs", EOVERFLOW);
+ (void) i;
+}
+
+
intmax_t
liberror_imaxabs(intmax_t i)
{
@@ -11,9 +21,7 @@ liberror_imaxabs(intmax_t i)
if (i != INTMAX_MIN)
return imaxabs(i);
liberror_save_backtrace(NULL);
- liberror_set_error_errno("The absolute value of largest negative integer "
- "cannot be represented as a signed integer",
- "imaxabs", EOVERFLOW);
+ liberror_imaxabs_failed(i);
return i;
#endif
}