# HG changeset patch # User Shinji KONO # Date 1396362305 -32400 # Node ID 3454953b3df009c59648ed0248fa37bac2d770b9 # Parent 509a394c5ff935dd878fff0a8c7bc65d0b907922 fix inline strinit not yet worked. diff -r 509a394c5ff9 -r 3454953b3df0 mc-parse.c --- a/mc-parse.c Tue Apr 01 18:02:03 2014 +0900 +++ b/mc-parse.c Tue Apr 01 23:25:05 2014 +0900 @@ -1596,13 +1596,13 @@ // missing brace case error(SIERR); if (inmode) { - offset = list3(DECL_DATA,e,car(t1)); - return offset; + offset = list4(DECL_DATA_LIST,offset,list3(DECL_DATA,e,car(t1)),car(t1)); + } else { + offset = assign_data(e,car(t1),v,offset); } - offset = assign_data(e,car(t1),v,offset); t1 = cadr(t1); if (! ( t1 && sym==COMMA)) return offset; - conv->comma_(); getsym(0); // fall thru + conv->comma_(); getsym(0); // fall through } mode=SFDINIT; while(1) { diff -r 509a394c5ff9 -r 3454953b3df0 test/strinit.c --- a/test/strinit.c Tue Apr 01 18:02:03 2014 +0900 +++ b/test/strinit.c Tue Apr 01 23:25:05 2014 +0900 @@ -129,7 +129,7 @@ { .sport = sport, .dport = dport } } }; - printf("#0131:%x %x\n",fl.oif,fl.uli_u.ports.dport); + printf("#0131:%x %x\n",fl.oif,fl.uli_u.ports.dport); } INLINE static @@ -138,7 +138,7 @@ u16 sport, u16 dport /*, struct sock *sk */) { struct flowi fl = { .oif = oif, - .iif = 55, + .iif = 55, .nl_u = { .ip4_u = { .daddr = dst, .saddr = 66, .tos = tos } }, @@ -147,8 +147,8 @@ { .sport = sport, .dport = dport } } }; - printf("#0149:%x %x\n",fl.oif,fl.uli_u.ports.dport); - printf("#0150:%x %x\n",fl.iif,fl.nl_u.ip4_u.saddr); + printf("#0149:%x %x\n",fl.oif,fl.uli_u.ports.dport); + printf("#0150:%x %x\n",fl.iif,fl.nl_u.ip4_u.saddr); } INLINE static @@ -158,7 +158,7 @@ { struct flowi fl, *flp; fl = (struct flowi){ .oif = oif, - .iif = 55, + .iif = 55, .nl_u = { .ip4_u = { .daddr = dst, .saddr = 66, .tos = tos } }, @@ -168,8 +168,8 @@ .dport = dport } } }; flp = &fl; - printf("#0170:%x %x\n",flp->oif,flp->uli_u.ports.dport); - printf("#0171:%x %x\n",flp->iif,flp->nl_u.ip4_u.saddr); + printf("#0170:%x %x\n",flp->oif,flp->uli_u.ports.dport); + printf("#0171:%x %x\n",flp->iif,flp->nl_u.ip4_u.saddr); } INLINE void