diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-16 14:25:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-17 08:14:03 +0200 |
commit | 224b770fa77fe12ad5dc543ce020aca316b6558d (patch) | |
tree | 5bd71b4ccf39558b4afcd3f7f67744a111cda3b8 /sal/rtl | |
parent | b2cb3196868deb499bb91fc9bdbe6c8f7d1e9033 (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>
Diffstat (limited to 'sal/rtl')
-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 db159dc41b71..557ff7fdeccb 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -24,14 +24,14 @@ #include <rtl/cipher.h> #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)) @@ -45,17 +45,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; \ } \ } @@ -68,17 +68,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 0e875680b706..178bfaa34d6d 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -29,16 +29,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); @@ -616,9 +616,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; @@ -1038,9 +1038,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); |