summaryrefslogtreecommitdiff
path: root/src/flex.skl
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2017-10-30 13:29:26 +0800
committerWill Estes <westes575@gmail.com>2017-11-28 15:06:10 -0500
commit87472f5aa72431cd48755fa8537089e00d67e036 (patch)
treecb6b8d2824108a89ba3db9477ffa815426e50b3c /src/flex.skl
parent12d2f8608046c5d43646e3c1dc277c0a2914ae1b (diff)
Obsolete yypad64() macro.
Slightly rewrite the logic in yytbl_data_load() and yytbl_write_pad64() so they simply check if the bytes read/written are in 8-byte boundary. No need to calculate how many bytes we need to pad. (Incidentally this makes smaller code in x86_64.) For yytbl_hdr_init(), just expand the calculation from the macro.
Diffstat (limited to 'src/flex.skl')
-rw-r--r--src/flex.skl4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/flex.skl b/src/flex.skl
index 332d3c0..f2da3a3 100644
--- a/src/flex.skl
+++ b/src/flex.skl
@@ -3300,9 +3300,7 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
/* Now eat padding. */
{
- int pad;
- pad = yypad64(rd->bread);
- while(--pad >= 0){
+ while (rd->bread % (8 * sizeof(flex_uint8_t)) > 0) {
flex_int8_t t8;
if(yytbl_read8(&t8,rd) != 0)
return -1;