Re: [PATCH 1/2] sock: fix bitwise OR operation short circuit

2016-12-22 Thread JingPiao Chen
>This cannot be the right fix: >if umove returned an error, ifc.ifc_buf is undefined. Yes, I make the same mistake. How to fix this bug? Thanks. -- JingPiao Chen 2016-12-23 7:03 GMT+08:00 Dmitry V. Levin : > On Mon, Dec 19, 2016 at 11:33:46PM +0800, JingPiao Chen wrote: > > sock.c: 150 > > > >

Re: [PATCH 1/2] sock: fix bitwise OR operation short circuit

2016-12-22 Thread Dmitry V. Levin
On Mon, Dec 19, 2016 at 11:33:46PM +0800, JingPiao Chen wrote: > sock.c: 150 > > 150 if (syserror(tcp) || umove(tcp, addr, &ifc) < 0) { > 151 if (ifc.ifc_buf) > 152 tprints("}"); > 153 else > 154 printaddr(addr