Commit f6da1797 authored by Lev Walkin's avatar Lev Walkin
Browse files

get rid of xer_is_whitespace()

parent 44bb01e7
...@@ -337,6 +337,7 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun ...@@ -337,6 +337,7 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun
ST_DIGITS_TRAILSPACE, ST_DIGITS_TRAILSPACE,
ST_HEXDIGIT1, ST_HEXDIGIT1,
ST_HEXDIGIT2, ST_HEXDIGIT2,
ST_HEXDIGITS_TRAILSPACE,
ST_HEXCOLON, ST_HEXCOLON,
ST_END_ENUM, ST_END_ENUM,
ST_UNEXPECTED ST_UNEXPECTED
...@@ -362,18 +363,16 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun ...@@ -362,18 +363,16 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun
switch(state) { switch(state) {
case ST_LEADSPACE: case ST_LEADSPACE:
case ST_DIGITS_TRAILSPACE: case ST_DIGITS_TRAILSPACE:
case ST_HEXDIGITS_TRAILSPACE:
case ST_SKIPSPHEX: case ST_SKIPSPHEX:
continue; continue;
case ST_HEXCOLON:
if(xer_is_whitespace(lp, lstop - lp)) {
lp = lstop - 1;
continue;
}
break;
case ST_DIGITS: case ST_DIGITS:
dec_value_end = lp; dec_value_end = lp;
state = ST_DIGITS_TRAILSPACE; state = ST_DIGITS_TRAILSPACE;
continue; continue;
case ST_HEXCOLON:
state = ST_HEXDIGITS_TRAILSPACE;
continue;
default: default:
break; break;
} }
...@@ -512,6 +511,7 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun ...@@ -512,6 +511,7 @@ INTEGER__xer_body_decode(asn_TYPE_descriptor_t *td, void *sptr, const void *chun
} }
break; break;
case ST_HEXCOLON: case ST_HEXCOLON:
case ST_HEXDIGITS_TRAILSPACE:
st->buf[st->size] = 0; /* Just in case termination */ st->buf[st->size] = 0; /* Just in case termination */
return XPBD_BODY_CONSUMED; return XPBD_BODY_CONSUMED;
case ST_HEXDIGIT1: case ST_HEXDIGIT1:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment