From 7e1a622124a6ca6c98e1f3170bf65649ad4321d9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 24 Jul 2011 20:17:00 +0200 Subject: sms: Fix style issues with the code, add spaces after keywords --- src/gsm/gsm_utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 6b9cadc4..1fa61168 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -66,8 +66,8 @@ static unsigned char gsm_7bit_alphabet[] = { static int gsm_septet_lookup(uint8_t ch) { int i = 0; - for(; i < sizeof(gsm_7bit_alphabet); i++){ - if(gsm_7bit_alphabet[i] == ch) + for (; i < sizeof(gsm_7bit_alphabet); i++) { + if (gsm_7bit_alphabet[i] == ch) return i; } return -1; @@ -108,7 +108,7 @@ int gsm_7bit_decode_hdr(char *text, const uint8_t *user_data, uint8_t septet_l, (((i + shift) * 7) & 7))) & 0x7f; } - for(i = 0; i < septet_l; i++){ + for (i = 0; i < septet_l; i++) { /* this is an extension character */ if(rtext[i] == 0x1b && i + 1 < septet_l){ tmp = rtext[i+1]; @@ -138,7 +138,7 @@ int gsm_septet_encode(uint8_t *result, const char *data) { int i, y = 0; uint8_t ch; - for(i = 0; i < strlen(data); i++){ + for (i = 0; i < strlen(data); i++) { ch = data[i]; switch(ch){ /* fall-through for extension characters */ @@ -177,7 +177,7 @@ int gsm_septets2octets(uint8_t *result, uint8_t *rdata, uint8_t septet_len, uint } else memcpy(data, rdata, septet_len); - for(i = 0; i < septet_len; i++) { + for (i = 0; i < septet_len; i++) { if (shift == 7) { /* * special end case with the. This is necessary if the -- cgit v1.2.3