diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-27 19:19:28 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-27 19:19:28 -0500 |
| commit | 1521e294dfd5928a266b3b678c63324b0200ef24 (patch) | |
| tree | 840384d4ece100e7ddadd7cf73e42dd9487c3191 | |
| parent | 4526ea0fe82b98e2298a3eb66e4ada7518633704 (diff) | |
define without overflow
| -rw-r--r-- | src/limits/LLONG_MIN.c | 2 | ||||
| -rw-r--r-- | src/stdint/INTMAX_MIN.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/limits/LLONG_MIN.c b/src/limits/LLONG_MIN.c index a28952fe..39986c4c 100644 --- a/src/limits/LLONG_MIN.c +++ b/src/limits/LLONG_MIN.c @@ -1,5 +1,5 @@ #include <limits.h> -#define LLONG_MIN (-9223372036854775808LL) +#define LLONG_MIN (-LLONG_MAX - 1LL) /* MIN: -9223372036854775807 */ /** minimum value of a type(long long int) **/ diff --git a/src/stdint/INTMAX_MIN.c b/src/stdint/INTMAX_MIN.c index 240d40b6..632b7ff0 100644 --- a/src/stdint/INTMAX_MIN.c +++ b/src/stdint/INTMAX_MIN.c @@ -1,5 +1,5 @@ #include <stdint.h> -#define INTMAX_MIN (-9223372036854775808LL) +#define INTMAX_MIN (-INTMAX_MAX - 1LL) /* STDC(199901) |
