summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-07-24 20:17:00 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-07-24 20:17:00 +0200
commit7e1a622124a6ca6c98e1f3170bf65649ad4321d9 (patch)
tree5ab8e90e90fbbdffd56276845da3250091cb4d1c /src
parent291e61346bb55d0462c07bf078cab3bb7eec2241 (diff)
sms: Fix style issues with the code, add spaces after keywords
Diffstat (limited to 'src')
-rw-r--r--src/gsm/gsm_utils.c10
1 files 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