X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Fust%2Fwait.h;h=6cc0e3732cec710133000d9d9dfd15b6556d1938;hb=4e2ee1f5ad0b837440f3b850e971f25db209cca1;hp=e92d52856c603144e105da87dab6533bf47bee04;hpb=b5234c068da77fe0b37aa7f2ba3efcb61cdb17bc;p=lttng-ust.git diff --git a/include/ust/wait.h b/include/ust/wait.h index e92d5285..6cc0e373 100644 --- a/include/ust/wait.h +++ b/include/ust/wait.h @@ -30,7 +30,7 @@ int __timeout = _timeout; \ \ for (;;) { \ - if (!(_cond)) \ + if (_cond) \ break; \ if (__timeout <= 0) { \ __ret = -ETIMEDOUT; \ @@ -38,7 +38,7 @@ } \ __pollret = poll(NULL, 0, 10); /* wait 10ms */ \ if (__pollret < 0) { \ - __ret = __pollret; \ + __ret = -errno; \ break; \ } \ __timeout -= 10; \