Skip to content

Commit c94eeb9

Browse files
author
foobar
committed
Another CS fix.
# Rasmus, at least try keep the style consistent..
1 parent 16da825 commit c94eeb9

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

ext/bcmath/bcmath.c

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ PHP_RINIT_FUNCTION(bcmath)
9797
if (cfg_get_long("bcmath.scale", &bc_precision) == FAILURE) {
9898
bc_precision = 0;
9999
}
100-
if(bc_precision<0) bc_precision=0;
100+
101+
if (bc_precision < 0) {
102+
bc_precision = 0;
103+
}
104+
101105
bc_init_numbers(TSRMLS_C);
102106

103107
return SUCCESS;
@@ -145,7 +149,7 @@ PHP_FUNCTION(bcadd)
145149
WRONG_PARAM_COUNT;
146150
}
147151
convert_to_long_ex(scale_param);
148-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
152+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
149153
break;
150154
default:
151155
WRONG_PARAM_COUNT;
@@ -191,7 +195,7 @@ PHP_FUNCTION(bcsub)
191195
WRONG_PARAM_COUNT;
192196
}
193197
convert_to_long_ex(scale_param);
194-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
198+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
195199
break;
196200
default:
197201
WRONG_PARAM_COUNT;
@@ -237,7 +241,7 @@ PHP_FUNCTION(bcmul)
237241
WRONG_PARAM_COUNT;
238242
}
239243
convert_to_long_ex(scale_param);
240-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
244+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
241245
break;
242246
default:
243247
WRONG_PARAM_COUNT;
@@ -283,7 +287,7 @@ PHP_FUNCTION(bcdiv)
283287
WRONG_PARAM_COUNT;
284288
}
285289
convert_to_long_ex(scale_param);
286-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
290+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
287291
break;
288292
default:
289293
WRONG_PARAM_COUNT;
@@ -296,7 +300,7 @@ PHP_FUNCTION(bcdiv)
296300
bc_init_num(&result TSRMLS_CC);
297301
php_str2num(&first, Z_STRVAL_PP(left) TSRMLS_CC);
298302
php_str2num(&second, Z_STRVAL_PP(right) TSRMLS_CC);
299-
switch (bc_divide (first, second, &result, scale TSRMLS_CC)) {
303+
switch (bc_divide(first, second, &result, scale TSRMLS_CC)) {
300304
case 0: /* OK */
301305
if (result->n_scale > scale) {
302306
result->n_scale = scale;
@@ -411,7 +415,7 @@ PHP_FUNCTION(bcpow)
411415
WRONG_PARAM_COUNT;
412416
}
413417
convert_to_long_ex(scale_param);
414-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
418+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
415419
break;
416420
default:
417421
WRONG_PARAM_COUNT;
@@ -457,7 +461,7 @@ PHP_FUNCTION(bcsqrt)
457461
WRONG_PARAM_COUNT;
458462
}
459463
convert_to_long_ex(scale_param);
460-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
464+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
461465
break;
462466
default:
463467
WRONG_PARAM_COUNT;
@@ -500,7 +504,7 @@ PHP_FUNCTION(bccomp)
500504
WRONG_PARAM_COUNT;
501505
}
502506
convert_to_long_ex(scale_param);
503-
scale = (int) (Z_LVAL_PP(scale_param)<0) ? 0:Z_LVAL_PP(scale_param);
507+
scale = (int) (Z_LVAL_PP(scale_param) < 0) ? 0 : Z_LVAL_PP(scale_param);
504508
break;
505509
default:
506510
WRONG_PARAM_COUNT;
@@ -534,7 +538,7 @@ PHP_FUNCTION(bcscale)
534538
}
535539

536540
convert_to_long_ex(new_scale);
537-
bc_precision = (Z_LVAL_PP(new_scale)<0) ? 0 : Z_LVAL_PP(new_scale);
541+
bc_precision = (Z_LVAL_PP(new_scale) < 0) ? 0 : Z_LVAL_PP(new_scale);
538542

539543
RETURN_TRUE;
540544
}

0 commit comments

Comments
 (0)