diff options
author | Mattias Andrée <maandree@kth.se> | 2019-11-01 22:06:40 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-11-01 22:06:40 +0100 |
commit | c57844b08bced71778f38f2346464c3e0836287c (patch) | |
tree | e3733b4c99818ee6c77ed3d4d37becf30f92268f /llabs.c | |
parent | Use installed liberror (diff) | |
download | liberror-libc-c57844b08bced71778f38f2346464c3e0836287c.tar.gz liberror-libc-c57844b08bced71778f38f2346464c3e0836287c.tar.bz2 liberror-libc-c57844b08bced71778f38f2346464c3e0836287c.tar.xz |
Add some functions and add functions with _failed suffix
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'llabs.c')
-rw-r--r-- | llabs.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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 } |