Browse Source

Style fixes

signals
Gavin Howard 4 years ago
parent
commit
a1c44399b4
Signed by untrusted user who does not match committer: gavin
GPG Key ID: C08038BDF280D33E
  1. 8
      src/bc/lex.c
  2. 12
      src/num.c

8
src/bc/lex.c

@ -383,7 +383,7 @@ BcStatus bc_lex_token(BcLex *l) {
BcStatus bc_lex_next(BcLex *l) {
BcStatus status;
BcStatus s;
assert(l);
@ -403,8 +403,8 @@ BcStatus bc_lex_next(BcLex *l) {
// Loop until failure or we don't have whitespace. This
// is so the parser doesn't get inundated with whitespace.
do {
status = bc_lex_token(l);
} while (!status && l->t.t == BC_LEX_WHITESPACE);
s = bc_lex_token(l);
} while (!s && l->t.t == BC_LEX_WHITESPACE);
return status;
return s;
}

12
src/num.c

@ -577,7 +577,7 @@ err:
BcStatus bc_num_binary(BcNum *a, BcNum *b, BcNum *c, size_t scale,
BcNumBinaryOp op, size_t req)
{
BcStatus status;
BcStatus s;
BcNum num2, *ptr_a, *ptr_b;
bool init = false;
@ -603,15 +603,15 @@ BcStatus bc_num_binary(BcNum *a, BcNum *b, BcNum *c, size_t scale,
}
else ptr_b = b;
if (init) status = bc_num_init(c, req);
else status = bc_num_expand(c, req);
if (init) s = bc_num_init(c, req);
else s = bc_num_expand(c, req);
if (status) goto err;
status = op(ptr_a, ptr_b, c, scale);
if (s) goto err;
s = op(ptr_a, ptr_b, c, scale);
err:
if (c == a || c == b) bc_num_free(&num2);
return status;
return s;
}
bool bc_num_strValid(const char *val, size_t base) {

Loading…
Cancel
Save