diff options
author | Emil Renner Berthing <systemd@esmil.dk> | 2014-09-19 20:26:53 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-09-22 18:20:21 +0200 |
commit | 8507eb20b64010b26f23822cbf442bb0bf96511c (patch) | |
tree | 2abb8a2420ec35dfcb031275bfd62dd4ace007ad /src/shared/util.h | |
parent | c17091b79773e9c458f03a897b26c2257d7366a7 (diff) |
util: avoid non-portable __WORDSIZE
Lets not unnecessarily rely on __WORDSIZE, which is not clearly specified
by any spec. Use explicit size comparisons if we're not interested in the
WORDSIZE, anyway.
(David: adjust commit message to explain why we do this)
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index a1d5657237..21a90a40e5 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -205,7 +205,7 @@ int safe_atod(const char *s, double *ret_d); int safe_atou8(const char *s, uint8_t *ret); -#if __WORDSIZE == 32 +#if LONG_MAX == INT_MAX static inline int safe_atolu(const char *s, unsigned long *ret_u) { assert_cc(sizeof(unsigned long) == sizeof(unsigned)); return safe_atou(s, (unsigned*) ret_u); |