X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Ftime-dst.c;h=6195b110176a3f05001a5d0c5d2c02a1795eddac;hb=7de80bfe2e61d5818601ccfddbadad3b7703ed70;hp=65e2998c983a5f9bab9343b1b5cfe15c58b03a05;hpb=955d98c9c1104d469c2989dbfb58f58ee6fe9bdc;p=elogind.git diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c index 65e2998c9..6195b1101 100644 --- a/src/shared/time-dst.c +++ b/src/shared/time-dst.c @@ -207,8 +207,8 @@ read_again: if (type_idxs[i] >= num_types) return -EINVAL; - if ((BYTE_ORDER != BIG_ENDIAN && (sizeof(time_t) == 4 || trans_width == 4)) || - (BYTE_ORDER == BIG_ENDIAN && sizeof(time_t) == 8 && trans_width == 4)) { + if (__BYTE_ORDER == __BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4 + : sizeof(time_t) == 4 || trans_width == 4) { /* Decode the transition times, stored as 4-byte integers in network (big-endian) byte order. We work from the end of the array so as not to clobber the next element to be @@ -216,7 +216,7 @@ read_again: i = num_transitions; while (i-- > 0) transitions[i] = decode((char *)transitions + i * 4); - } else if (BYTE_ORDER != BIG_ENDIAN && sizeof(time_t) == 8) { + } else if (__BYTE_ORDER != __BIG_ENDIAN && sizeof(time_t) == 8) { /* Decode the transition times, stored as 8-byte integers in network (big-endian) byte order. */ for (i = 0; i < num_transitions; ++i)