diff options
| author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2020-07-01 00:34:46 +0000 |
|---|---|---|
| committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2020-07-01 00:34:46 +0000 |
| commit | 6465e74020fd5418043a4b23ffdc2011e34f0c7a (patch) | |
| tree | ff74207a4ed4f5054a9ccd8fcfef8aeba6e8b71b | |
| parent | 34334e5d3f89fe7c1e07e776761f5fa614e67fb7 (diff) | |
| download | json-c-6465e74020fd5418043a4b23ffdc2011e34f0c7a.tar.gz | |
Use constants referring to the signed integer types when setting SSIZE_T_MAX.
In practice, the sizes of the signed and unsigned integer types will
almost cetainly be the same, but this is more correct.
Pointed out in issue #638.
| -rw-r--r-- | json_object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/json_object.c b/json_object.c index 1dffd00..73daa4c 100644 --- a/json_object.c +++ b/json_object.c @@ -41,11 +41,11 @@ #ifndef SSIZE_T_MAX #if SIZEOF_SSIZE_T == SIZEOF_INT -#define SSIZE_T_MAX UINT_MAX +#define SSIZE_T_MAX INT_MAX #elif SIZEOF_SSIZE_T == SIZEOF_LONG -#define SSIZE_T_MAX ULONG_MAX +#define SSIZE_T_MAX LONG_MAX #elif SIZEOF_SSIZE_T == SIZEOF_LONG_LONG -#define SSIZE_T_MAX ULLONG_MAX +#define SSIZE_T_MAX LLONG_MAX #else #error Unable to determine size of ssize_t #endif |
