Skip to content

Commit

Permalink
Stylistic change.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim2266 committed Oct 16, 2015
1 parent 469574e commit 5a82041
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/converters.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,18 @@ const char* convert_significant_digits(const char* s, long* const result)
}

static
const char* convert_digits(const char* s, long* const result)
const char* skip_zeroes(const char* s)
{
// skip leading zeroes
while(*s == '0')
++s;

// convert digits
return convert_significant_digits(s, result);
return s;
}

static
const char* convert_digits(const char* s, long* const result)
{
return convert_significant_digits(skip_zeroes(s), result);
}

// tag as long integer
Expand Down Expand Up @@ -170,11 +174,7 @@ fix_error get_fix_tag_as_double(const fix_group* const group, unsigned tag, doub
}

// skip leading zeroes
const char* s = value.begin;

while(*s == '0')
++s;

const char* s = skip_zeroes(value.begin);
const unsigned nzero = s - value.begin;

value.begin = s;
Expand Down

0 comments on commit 5a82041

Please sign in to comment.