Re: [Qemu-devel] [PATCH] linux-user: simplify/refactor socketcall implementation

2014-02-13 Thread Michael Tokarev
12 февраля 2014 г. 23:40:46 GMT+04:00, Peter Maydell : >I think it would be nice to have here: >assert(ac[num] <= ARRAY_SIZE(a)); > >just as a reminder to bump the ac[] array size if anybody adds a >7-argument >function in future. Yeah good point, I'll add this assert. Thank you! >Otherwise >

Re: [Qemu-devel] [PATCH] linux-user: simplify/refactor socketcall implementation

2014-02-12 Thread Peter Maydell
On 6 February 2014 06:56, Michael Tokarev wrote: > socketcall is just a dispatcher, it accepts an array of ulongs and should > call the right socket function. We tried to handle arguments for every > function case, and did that differently, which in the past caused errors > due to wrong types or

[Qemu-devel] [PATCH] linux-user: simplify/refactor socketcall implementation

2014-02-05 Thread Michael Tokarev
socketcall is just a dispatcher, it accepts an array of ulongs and should call the right socket function. We tried to handle arguments for every function case, and did that differently, which in the past caused errors due to wrong types or sizes used. So instead of extracting args in every case,