Hi! > ret = read(fd, buf, count); > if (ret >= 0 || errno != errnum) { > tst_resm(TFAIL, "read allows %s. returns %d: %s", msg, ret, > strerror(errno)); > l_fail = TRUE;
As far as I can see this code tests that read() has returned negative value and in this case errno must be set. I.e. if ret >= 0 -> read hasn't failed -> FAILURE The errno != errnum is not evaluated unless the first condition has failed (that means ret < 0) and in this case errno must be set. The condition is equivalent to !(ret < 0 && errno == errnum) Or am I missing something? -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list