]> granicus.if.org Git - libexpat/commitdiff
siphash.h: Prepare for application of clang-format
authorSebastian Pipping <sebastian@pipping.org>
Sun, 28 Jul 2019 15:14:06 +0000 (17:14 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 3 Aug 2019 19:31:44 +0000 (21:31 +0200)
.travis.yml
expat/apply-clang-format.sh
expat/lib/siphash.h

index 71a434a39d828c166de7c0ca47bc39e26f007556..0a1e23a2c314b1ac8a622a9cee7a7d505c9c229a 100644 (file)
@@ -55,6 +55,7 @@ addons:
       - dos2unix
       - lzip
       - mingw-w64
+      - moreutils
       - rpm
       - wine
 
index 420b62c44673602994f04bf5e69ff25e02c177c0..50d8d224a5fa94e24bc1fd1305d6c3b0fda5dea3 100755 (executable)
@@ -32,6 +32,8 @@ set -e
 set -u
 set -o pipefail
 
+expand --tabs=2 --initial lib/siphash.h | sponge lib/siphash.h
+
 find \
         -name '*.[ch]' \
         -o -name '*.cpp' \
index 4d6786d7839a2c1a99989930afec3dbe8789a2bc..95dfff13cd9eb0f673ca4b077226eaac203d5e6c 100644 (file)
  * --------------------------------------------------------------------------
  * HISTORY:
  *
+ * 2019-08-03  (Sebastian Pipping)
+ *   - Mark part of sip24_valid as to be excluded from clang-format
+ *   - Re-format code using clang-format 9
+ *
  * 2018-07-08  (Anton Maklakov)
  *   - Add "fall through" markers for GCC's -Wimplicit-fallthrough
  *
@@ -286,6 +290,7 @@ static uint64_t siphash24(const void *src, size_t len,
  * in = 00 01 02 ... 3e (63 bytes)
  */
 static int sip24_valid(void) {
+       /* clang-format off */
        static const unsigned char vectors[64][8] = {
                { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, },
                { 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, },
@@ -352,6 +357,8 @@ static int sip24_valid(void) {
                { 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, },
                { 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, }
        };
+       /* clang-format on */
+
        unsigned char in[64];
        struct sipkey k;
        size_t i;