summaryrefslogtreecommitdiff
path: root/string_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'string_utils.c')
-rw-r--r--string_utils.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/string_utils.c b/string_utils.c
index b5ec2c2..31ef0ff 100644
--- a/string_utils.c
+++ b/string_utils.c
@@ -210,12 +210,15 @@ int String_is_it_numeric(char *parameter)
parameter[j]=0;
}
- if (i < strlen(parameter))
- if ( (parameter[i]=='e' && parameter[i+1]=='-')
- || (parameter[i]=='e' && parameter[i+1]=='+') )
+ if (i < strlen(parameter)) {
+ if ( (parameter[i]=='e' && parameter[i+1]=='-')
+ || (parameter[i]=='e' && parameter[i+1]=='+') ) {
for (i+=2; (i < strlen(parameter)) && isdigit(parameter[i]); ++i) {}
- else if (parameter[i]=='e' && isdigit(parameter[i+1]) )
+ }
+ else if (parameter[i]=='e' && isdigit(parameter[i+1]) ) {
for (i+=2; (i < strlen(parameter)) && isdigit(parameter[i]); ++i) {}
+ }
+ }
/* suck out spaces */
while ( (i<strlen(parameter)) && (isspace(parameter[i])) ) {
@@ -225,7 +228,7 @@ int String_is_it_numeric(char *parameter)
parameter[j]=0;
}
- if (i = strlen(parameter)) {
+ if ((i = strlen(parameter))) {
is_number=1;
parameter[i]=0;
}