From 56599acb730dfd061ebeb32cdd17a7b46cdd80ba Mon Sep 17 00:00:00 2001 From: Wilhansen Li Date: Tue, 27 Dec 2016 01:30:36 +0800 Subject: [PATCH] Fix formatting. --- dtbTool.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dtbTool.c b/dtbTool.c index b5dd935..9b28396 100644 --- a/dtbTool.c +++ b/dtbTool.c @@ -84,15 +84,18 @@ int entry_cmp(uint8_t *a, uint8_t *b) return memcmp(a, b, INFO_ENTRY_SIZE); } -uint32_t swap_bytes_u32(uint32_t b) { +uint32_t swap_bytes_u32(uint32_t b) +{ return ((b & 0xFF000000) >> 24) | ((b & 0x00FF0000) >> 8) | ((b & 0x0000FF00) << 8) | (b << 24); } -void padSpaces(uint8_t *s, int sz) { +void padSpaces(uint8_t *s, int sz) +{ --sz; - while ( sz >= 0 && s[sz] == 0 ) { + while ( sz >= 0 && s[sz] == 0 ) + { s[sz] = 0x20; --sz; } -- 2.20.1