aboutsummaryrefslogtreecommitdiffstats
path: root/main/enum.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-06 00:14:32 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-06 00:14:32 +0000
commitf9f33f16fbad3c7f228791cb1f4e38b4d73ced73 (patch)
tree629fd8245dca6f6351b5dcf9560420dfb221655e /main/enum.c
parentc7864bc14b10cc91805378e278f007019dfc7187 (diff)
Merged revisions 105840 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r105840 | tilghman | 2008-03-04 17:04:29 -0600 (Tue, 04 Mar 2008) | 2 lines Whitespace changes only ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106306 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/enum.c')
-rw-r--r--main/enum.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/enum.c b/main/enum.c
index b54580263..3f4266ac3 100644
--- a/main/enum.c
+++ b/main/enum.c
@@ -207,22 +207,22 @@ static int parse_naptr(char *dst, int dstsize, char *tech, int techsize, unsigne
delim = regexp[0];
delim2 = strchr(regexp + 1, delim);
- if ((delim2 == NULL) || (regexp[regexp_len-1] != delim)) {
- ast_log(LOG_WARNING, "Regex delimiter error (on \"%s\").\n",regexp);
+ if ((delim2 == NULL) || (regexp[regexp_len - 1] != delim)) {
+ ast_log(LOG_WARNING, "Regex delimiter error (on \"%s\").\n", regexp);
return -1;
}
pattern = regexp + 1;
*delim2 = 0;
subst = delim2 + 1;
- regexp[regexp_len-1] = 0;
+ regexp[regexp_len - 1] = 0;
/*
* now do the regex wizardry.
*/
if (regcomp(&preg, pattern, REG_EXTENDED | REG_NEWLINE)) {
- ast_log(LOG_WARNING, "NAPTR Regex compilation error (regex = \"%s\").\n",regexp);
+ ast_log(LOG_WARNING, "NAPTR Regex compilation error (regex = \"%s\").\n", regexp);
return -1;
}
@@ -314,7 +314,7 @@ static int txt_callback(void *context, unsigned char *answer, int len, unsigned
ast_copy_string(c->txt, (const char *) answer, len < c->txtlen ? len : (c->txtlen));
/* just to be safe, let's make sure c->txt is null terminated */
- c->txt[(c->txtlen)-1] = '\0';
+ c->txt[(c->txtlen) - 1] = '\0';
return 1;
}
@@ -377,7 +377,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
if (!(context = ast_calloc(1, sizeof(*context))))
return -1;
- ast_copy_string(naptrinput, number[0] == 'n' ? number+1 : number, sizeof(naptrinput));
+ ast_copy_string(naptrinput, number[0] == 'n' ? number + 1 : number, sizeof(naptrinput));
context->naptrinput = naptrinput; /* The number */
context->dst = dst; /* Return string */
@@ -411,7 +411,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
}
if (p1 != NULL) {
- p2 = p1+1;
+ p2 = p1 + 1;
while (p1 > number){
p1--;
tmp[newpos++] = *p1;
@@ -501,7 +501,7 @@ int ast_get_enum(struct ast_channel *chan, const char *number, char *dst, int ds
}
}
for (k = 0; k < context->naptr_rrs_count; k++) {
- if (context->naptr_rrs[k].sort_pos == context->position-1) {
+ if (context->naptr_rrs[k].sort_pos == context->position - 1) {
ast_copy_string(context->dst, context->naptr_rrs[k].result, dstlen);
ast_copy_string(context->tech, context->naptr_rrs[k].tech, techlen);
break;