whitespace fixes

This commit is contained in:
David Lamparter 2016-06-22 13:44:56 +02:00
parent 1c0652db2d
commit 48535d02bd
3 changed files with 7 additions and 7 deletions

View file

@ -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); str_addf(func, "%s = (int32_t) ((int32_t)capn_read32(%s, %d))%s;\n", var, ptr, 4*f->f.slot.offset, xor);
return; return;
case Type_int64: 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; return;
case Type_uint8: case Type_uint8:
str_addf(func, "%s = capn_read8(%s, %d)%s;\n", var, ptr, f->f.slot.offset, xor); str_addf(func, "%s = capn_read8(%s, %d)%s;\n", var, ptr, f->f.slot.offset, xor);

View file

@ -356,12 +356,12 @@ CAPN_INLINE int capn_write1(capn_ptr p, int off, int val) {
if (off >= p.datasz*8) { if (off >= p.datasz*8) {
return -1; return -1;
} else if (val) { } else if (val) {
uint8_t tmp = (uint8_t)(1 << ( off & 7)); uint8_t tmp = (uint8_t)(1 << (off & 7));
( (uint8_t*)p.data )[off>>3] |= tmp; ((uint8_t*) p.data)[off >> 3] |= tmp;
return 0; return 0;
} else { } else {
uint8_t tmp = (uint8_t)(~(1 << ( off & 7))); uint8_t tmp = (uint8_t)(~(1 << (off & 7)));
((uint8_t*)p.data)[off>>3] &= tmp; ((uint8_t*) p.data)[off >> 3] &= tmp;
return 0; return 0;
} }
} }