From 48535d02bd14322c2d83985d9f21eeb42d561dac Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Wed, 22 Jun 2016 13:44:56 +0200 Subject: [PATCH] whitespace fixes --- compiler/capnpc-c.c | 2 +- lib/capn-malloc.c | 2 +- lib/capnp_c.h | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/compiler/capnpc-c.c b/compiler/capnpc-c.c index 809cc81..95f927f 100644 --- a/compiler/capnpc-c.c +++ b/compiler/capnpc-c.c @@ -576,7 +576,7 @@ static void get_member(struct str *func, struct field *f, const char *ptr, const str_addf(func, "%s = (int32_t) ((int32_t)capn_read32(%s, %d))%s;\n", var, ptr, 4*f->f.slot.offset, xor); return; case Type_int64: - str_addf(func, "%s = (int64_t)((int64_t)(capn_read64(%s, %d))%s);\n", var, ptr, 8*f->f.slot.offset, xor); + str_addf(func, "%s = (int64_t) ((int64_t)(capn_read64(%s, %d))%s);\n", var, ptr, 8*f->f.slot.offset, xor); return; case Type_uint8: str_addf(func, "%s = capn_read8(%s, %d)%s;\n", var, ptr, f->f.slot.offset, xor); diff --git a/lib/capn-malloc.c b/lib/capn-malloc.c index 525ae99..a97ec16 100644 --- a/lib/capn-malloc.c +++ b/lib/capn-malloc.c @@ -17,7 +17,7 @@ /* Visual Studio notes: * Unless capn_segment is defined with __declspec(align(64)), check_segment_alignment * Fails to compile in x86 mode, as (sizeof(struct capn_segment)&7) -> (44 & 7) evaluates to 4 - * Compiles in x64 mode, as (sizeof(struct capn_segment)&7) -> (80 & 7) evaluates to 0 + * Compiles in x64 mode, as (sizeof(struct capn_segment)&7) -> (80 & 7) evaluates to 0 */ struct check_segment_alignment { unsigned int foo : (sizeof(struct capn_segment)&7) ? -1 : 1; diff --git a/lib/capnp_c.h b/lib/capnp_c.h index e96ce01..b78ac58 100644 --- a/lib/capnp_c.h +++ b/lib/capnp_c.h @@ -15,7 +15,7 @@ #include #include -// ssize_t is not defined in stdint.h in MSVC. +// ssize_t is not defined in stdint.h in MSVC. #ifdef _MSC_VER typedef intmax_t ssize_t; #endif @@ -356,12 +356,12 @@ CAPN_INLINE int capn_write1(capn_ptr p, int off, int val) { if (off >= p.datasz*8) { return -1; } else if (val) { - uint8_t tmp = (uint8_t)(1 << ( off & 7)); - ( (uint8_t*)p.data )[off>>3] |= tmp; + uint8_t tmp = (uint8_t)(1 << (off & 7)); + ((uint8_t*) p.data)[off >> 3] |= tmp; return 0; } else { - uint8_t tmp = (uint8_t)(~(1 << ( off & 7))); - ((uint8_t*)p.data)[off>>3] &= tmp; + uint8_t tmp = (uint8_t)(~(1 << (off & 7))); + ((uint8_t*) p.data)[off >> 3] &= tmp; return 0; } }