diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-16 14:25:56 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:49 -0500 |
commit | 67ea91dbfd98598017d88c66a455de58f45cb074 (patch) | |
tree | 7f1d081c07ff60548af685aa2abf413bb86be86e /sal | |
parent | 9493d3f11ba1f9e08e23ea7a1ffce1654dc264a9 (diff) |
remove UL/L suffixes from shift-by-constant expressions
Change-Id: Ia470f643e3eefeccc14183133603db260460bd53
Reviewed-on: https://gerrit.libreoffice.org/41212
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 224b770fa77fe12ad5dc543ce020aca316b6558d)
(cherry picked from commit 58c171983d4f828d36bf1f6d8fb8329e69424c7e)
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/cipher.cxx | 24 | ||||
-rw-r--r-- | sal/rtl/digest.cxx | 16 |
2 files changed, 20 insertions, 20 deletions
diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx index 959aa8a3a7b3..0f9d7cc7bd8f 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -29,14 +29,14 @@ * *======================================================================*/ #define RTL_CIPHER_NTOHL(c, l) \ - ((l) = ((sal_uInt32)(*((c)++))) << 24L, \ - (l) |= ((sal_uInt32)(*((c)++))) << 16L, \ + ((l) = ((sal_uInt32)(*((c)++))) << 24, \ + (l) |= ((sal_uInt32)(*((c)++))) << 16, \ (l) |= ((sal_uInt32)(*((c)++))) << 8L, \ (l) |= ((sal_uInt32)(*((c)++)))) #define RTL_CIPHER_HTONL(l, c) \ - (*((c)++) = (sal_uInt8)(((l) >> 24L) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 16L) & 0xff), \ + (*((c)++) = (sal_uInt8)(((l) >> 24) & 0xff), \ + *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 8L) & 0xff), \ *((c)++) = (sal_uInt8)(((l) ) & 0xff)) @@ -50,17 +50,17 @@ SAL_FALLTHROUGH; \ case 7: (xr) |= ((sal_uInt32)(*(--(c)))) << 8L; \ SAL_FALLTHROUGH; \ - case 6: (xr) |= ((sal_uInt32)(*(--(c)))) << 16L; \ + case 6: (xr) |= ((sal_uInt32)(*(--(c)))) << 16; \ SAL_FALLTHROUGH; \ - case 5: (xr) |= ((sal_uInt32)(*(--(c)))) << 24L; \ + case 5: (xr) |= ((sal_uInt32)(*(--(c)))) << 24; \ SAL_FALLTHROUGH; \ case 4: (xl) = ((sal_uInt32)(*(--(c)))); \ SAL_FALLTHROUGH; \ case 3: (xl) |= ((sal_uInt32)(*(--(c)))) << 8L; \ SAL_FALLTHROUGH; \ - case 2: (xl) |= ((sal_uInt32)(*(--(c)))) << 16L; \ + case 2: (xl) |= ((sal_uInt32)(*(--(c)))) << 16; \ SAL_FALLTHROUGH; \ - case 1: (xl) |= ((sal_uInt32)(*(--(c)))) << 24L; \ + case 1: (xl) |= ((sal_uInt32)(*(--(c)))) << 24; \ } \ } @@ -73,17 +73,17 @@ SAL_FALLTHROUGH; \ case 7: *(--(c)) = (sal_uInt8)(((xr) >> 8L) & 0xff); \ SAL_FALLTHROUGH; \ - case 6: *(--(c)) = (sal_uInt8)(((xr) >> 16L) & 0xff); \ + case 6: *(--(c)) = (sal_uInt8)(((xr) >> 16) & 0xff); \ SAL_FALLTHROUGH; \ - case 5: *(--(c)) = (sal_uInt8)(((xr) >> 24L) & 0xff); \ + case 5: *(--(c)) = (sal_uInt8)(((xr) >> 24) & 0xff); \ SAL_FALLTHROUGH; \ case 4: *(--(c)) = (sal_uInt8)(((xl) ) & 0xff); \ SAL_FALLTHROUGH; \ case 3: *(--(c)) = (sal_uInt8)(((xl) >> 8L) & 0xff); \ SAL_FALLTHROUGH; \ - case 2: *(--(c)) = (sal_uInt8)(((xl) >> 16L) & 0xff); \ + case 2: *(--(c)) = (sal_uInt8)(((xl) >> 16) & 0xff); \ SAL_FALLTHROUGH; \ - case 1: *(--(c)) = (sal_uInt8)(((xl) >> 24L) & 0xff); \ + case 1: *(--(c)) = (sal_uInt8)(((xl) >> 24) & 0xff); \ } \ } diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx index 51cef8198037..e54ada89e5f2 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -34,16 +34,16 @@ #define RTL_DIGEST_ROTL(a,n) (((a) << (n)) | ((a) >> (32 - (n)))) #define RTL_DIGEST_HTONL(l,c) \ - (*((c)++) = (sal_uInt8)(((l) >> 24L) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 16L) & 0xff), \ + (*((c)++) = (sal_uInt8)(((l) >> 24) & 0xff), \ + *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 8L) & 0xff), \ *((c)++) = (sal_uInt8)(((l) ) & 0xff)) #define RTL_DIGEST_LTOC(l,c) \ (*((c)++) = (sal_uInt8)(((l) ) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 8L) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 16L) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 24L) & 0xff)) + *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \ + *((c)++) = (sal_uInt8)(((l) >> 24) & 0xff)) typedef rtlDigestError (SAL_CALL Digest_init_t) ( void *ctx, const sal_uInt8 *Data, sal_uInt32 DatLen); @@ -705,9 +705,9 @@ static void endMD5 (DigestContextMD5 *ctx) SAL_FALLTHROUGH; case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; SAL_FALLTHROUGH; - case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16L; + case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16; SAL_FALLTHROUGH; - case 3: X[i] |= ((sal_uInt32)(*p)) << 24L; + case 3: X[i] |= ((sal_uInt32)(*p)) << 24; } i += 1; @@ -1159,9 +1159,9 @@ static void endSHA (DigestContextSHA *ctx) SAL_FALLTHROUGH; case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; SAL_FALLTHROUGH; - case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16L; + case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16; SAL_FALLTHROUGH; - case 3: X[i] |= ((sal_uInt32)(*(p++))) << 24L; + case 3: X[i] |= ((sal_uInt32)(*(p++))) << 24; } swapLong (X, i + 1); |