Skip to content

Commit a81f0a8

Browse files
committed
Auto-format according to new clang-format.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 5509ec3 commit a81f0a8

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <sys/select.h>
4040
#include <errno.h>
4141
#include <unistd.h>
42-
#define _sleep(x) usleep((x)*1000)
42+
#define _sleep(x) usleep((x) * 1000)
4343
#else
4444
#include <winsock2.h>
4545
#ifndef ETIMEDOUT

src/md5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
#define PUT_32BIT_LSB_FIRST(cp, value) \
3939
do { \
40-
(cp)[0] = (value)&0xFF; \
40+
(cp)[0] = (value) & 0xFF; \
4141
(cp)[1] = ((value) >> 8) & 0xFF; \
4242
(cp)[2] = ((value) >> 16) & 0xFF; \
4343
(cp)[3] = ((value) >> 24) & 0xFF; \

src/rand.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ struct _xmpp_rand_t {
6868
};
6969

7070
/* returns smallest number mupliple of y that not less than x */
71-
#define round_up(x, y) (((x) + (y)-1) / (y) * (y))
71+
#define round_up(x, y) (((x) + (y) - 1) / (y) * (y))
7272
/* returns smallest integer number that not less than x/y */
73-
#define div_round_up(x, y) (((x) + (y)-1) / (y))
73+
#define div_round_up(x, y) (((x) + (y) - 1) / (y))
7474

7575
/* adds two arrays as numbers in big-endian representation and stores
7676
* result in the first one.

src/resolver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ static void netbuf_add_16bitnum(unsigned char *buf,
630630

631631
/* assuming big endian */
632632
*p++ = (num >> 8) & 0xff;
633-
*p++ = (num)&0xff;
633+
*p++ = (num) & 0xff;
634634

635635
*offset += 2;
636636
}

src/sha.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ extern "C" {
5353
(y)[0] = (uint8_t)(((x) >> 24) & 255); \
5454
(y)[1] = (uint8_t)(((x) >> 16) & 255); \
5555
(y)[2] = (uint8_t)(((x) >> 8) & 255); \
56-
(y)[3] = (uint8_t)((x)&255); \
56+
(y)[3] = (uint8_t)((x) & 255); \
5757
} while (0)
5858

5959
#define LOAD32H(x, y) \
@@ -72,7 +72,7 @@ extern "C" {
7272
(y)[4] = (uint8_t)(((x) >> 24) & 255); \
7373
(y)[5] = (uint8_t)(((x) >> 16) & 255); \
7474
(y)[6] = (uint8_t)(((x) >> 8) & 255); \
75-
(y)[7] = (uint8_t)((x)&255); \
75+
(y)[7] = (uint8_t)((x) & 255); \
7676
} while (0)
7777

7878
#define LOAD64H(x, y) \
@@ -96,13 +96,13 @@ extern "C" {
9696
#define CONST64(n) n##ULL
9797
#endif
9898

99-
#define RORc(x, y) \
100-
(((((uint32_t)(x)&0xFFFFFFFFUL) >> (uint32_t)((y)&31)) | \
101-
((uint32_t)(x) << (uint32_t)((32 - ((y)&31)) & 31))) & \
99+
#define RORc(x, y) \
100+
(((((uint32_t)(x) & 0xFFFFFFFFUL) >> (uint32_t)((y) & 31)) | \
101+
((uint32_t)(x) << (uint32_t)((32 - ((y) & 31)) & 31))) & \
102102
0xFFFFFFFFUL)
103-
#define ROR64c(x, y) \
104-
(((((x)&CONST64(0xFFFFFFFFFFFFFFFF)) >> ((uint64_t)(y)&CONST64(63))) | \
105-
((x) << (((uint64_t)64 - ((y)&63)) & 63))) & \
103+
#define ROR64c(x, y) \
104+
(((((x) & CONST64(0xFFFFFFFFFFFFFFFF)) >> ((uint64_t)(y) & CONST64(63))) | \
105+
((x) << (((uint64_t)64 - ((y) & 63)) & 63))) & \
106106
CONST64(0xFFFFFFFFFFFFFFFF))
107107

108108
#ifdef __cplusplus

src/sha256.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define Ch(x, y, z) (z ^ (x & (y ^ z)))
1010
#define Maj(x, y, z) (((x | y) & z) | (x & y))
1111
#define S(x, n) RORc((x), (n))
12-
#define R(x, n) (((x)&0xFFFFFFFFUL) >> (n))
12+
#define R(x, n) (((x) & 0xFFFFFFFFUL) >> (n))
1313
#define Sigma0(x) (S(x, 2) ^ S(x, 13) ^ S(x, 22))
1414
#define Sigma1(x) (S(x, 6) ^ S(x, 11) ^ S(x, 25))
1515
#define Gamma0(x) (S(x, 7) ^ S(x, 18) ^ R(x, 3))

src/sha512.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static const uint64_t K[80] = {
5252
#define Ch(x, y, z) (z ^ (x & (y ^ z)))
5353
#define Maj(x, y, z) (((x | y) & z) | (x & y))
5454
#define S(x, n) ROR64c(x, n)
55-
#define R(x, n) (((x)&CONST64(0xFFFFFFFFFFFFFFFF)) >> ((uint64_t)n))
55+
#define R(x, n) (((x) & CONST64(0xFFFFFFFFFFFFFFFF)) >> ((uint64_t)n))
5656
#define Sigma0(x) (S(x, 28) ^ S(x, 34) ^ S(x, 39))
5757
#define Sigma1(x) (S(x, 14) ^ S(x, 18) ^ S(x, 41))
5858
#define Gamma0(x) (S(x, 1) ^ S(x, 8) ^ R(x, 7))

0 commit comments

Comments
 (0)