aboutsummaryrefslogtreecommitdiffstats
path: root/strtoi64.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-19 13:47:08 +0200
committerMattias Andrée <maandree@kth.se>2022-07-19 13:47:08 +0200
commit3dd9089913623ccfa54ec7a2b5e876d17316c838 (patch)
treef39a4ead77a213f9904b4e21ff3aac1445b16612 /strtoi64.c
parentMove some test code to newline created .c files (diff)
downloadlibsimple-3dd9089913623ccfa54ec7a2b5e876d17316c838.tar.gz
libsimple-3dd9089913623ccfa54ec7a2b5e876d17316c838.tar.bz2
libsimple-3dd9089913623ccfa54ec7a2b5e876d17316c838.tar.xz
Improve makefile and fix a bug
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'strtoi64.c')
-rw-r--r--strtoi64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/strtoi64.c b/strtoi64.c
index d34940c..6e0a898 100644
--- a/strtoi64.c
+++ b/strtoi64.c
@@ -6,8 +6,8 @@
#define RET_MIN (-RET_MAX - 1LL)
-int_least32_t
-libsimple_strtoi32(const char *restrict nptr, char **restrict end, int base) /* TODO test, man */
+int_least64_t
+libsimple_strtoi64(const char *restrict nptr, char **restrict end, int base) /* TODO test, man */
{
intmax_t r = strtoimax(nptr, end, base);
if(r < RET_MIN) {
@@ -17,7 +17,7 @@ libsimple_strtoi32(const char *restrict nptr, char **restrict end, int base) /*
r = RET_MAX;
errno = ERANGE;
}
- return (int_least32_t)r;
+ return (int_least64_t)r;
}