From a8823830d39bdbde8d4f4f34bfcb26dc4bf79741 Mon Sep 17 00:00:00 2001 From: iphydf Date: Mon, 12 Sep 2016 21:37:58 +0100 Subject: Add some astyle options to make it do more. It now enforces a bit more formatting. In particular, padding inside parentheses is removed. I would like it to remove padding after unary operators, but there seems to be no option for that. --- toxcore/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toxcore/util.c') diff --git a/toxcore/util.c b/toxcore/util.c index 40bf2849..f9fe7852 100644 --- a/toxcore/util.c +++ b/toxcore/util.c @@ -86,7 +86,7 @@ void host_to_net(uint8_t *num, uint16_t numbytes) uint16_t lendian_to_host16(uint16_t lendian) { #ifdef WORDS_BIGENDIAN - return (lendian << 8) | (lendian >> 8 ); + return (lendian << 8) | (lendian >> 8); #else return lendian; #endif @@ -95,7 +95,7 @@ uint16_t lendian_to_host16(uint16_t lendian) void host_to_lendian32(uint8_t *dest, uint32_t num) { #ifdef WORDS_BIGENDIAN - num = ((num << 8) & 0xFF00FF00 ) | ((num >> 8) & 0xFF00FF ); + num = ((num << 8) & 0xFF00FF00) | ((num >> 8) & 0xFF00FF); num = (num << 16) | (num >> 16); #endif memcpy(dest, &num, sizeof(uint32_t)); @@ -106,7 +106,7 @@ void lendian_to_host32(uint32_t *dest, const uint8_t *lendian) uint32_t d; memcpy(&d, lendian, sizeof(uint32_t)); #ifdef WORDS_BIGENDIAN - d = ((d << 8) & 0xFF00FF00 ) | ((d >> 8) & 0xFF00FF ); + d = ((d << 8) & 0xFF00FF00) | ((d >> 8) & 0xFF00FF); d = (d << 16) | (d >> 16); #endif *dest = d; -- cgit v1.2.3