From c57844b08bced71778f38f2346464c3e0836287c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 1 Nov 2019 22:06:40 +0100 Subject: Add some functions and add functions with _failed suffix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- llabs.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'llabs.c') diff --git a/llabs.c b/llabs.c index 6aa6362..539a0c4 100644 --- a/llabs.c +++ b/llabs.c @@ -2,6 +2,16 @@ #include "internal.h" +void +liberror_llabs_failed(long long int i) +{ + liberror_set_error_errno("The absolute value of largest negative integer " + "cannot be represented as a signed integer", + "llabs", EOVERFLOW); + (void) i; +} + + long long int liberror_llabs(long long int i) { @@ -11,9 +21,7 @@ liberror_llabs(long long int i) if (i != LLONG_MIN) return llabs(i); liberror_save_backtrace(NULL); - liberror_set_error_errno("The absolute value of largest negative integer " - "cannot be represented as a signed integer", - "llabs", EOVERFLOW); + liberror_llabs(i); return i; #endif } -- cgit v1.2.3-70-g09d2