int __timeout = _timeout; \
\
for (;;) { \
- if (!(_cond)) \
+ if (_cond) \
break; \
if (__timeout <= 0) { \
__ret = -ETIMEDOUT; \
} \
__pollret = poll(NULL, 0, 10); /* wait 10ms */ \
if (__pollret < 0) { \
- __ret = __pollret; \
+ __ret = -errno; \
break; \
} \
__timeout -= 10; \