> On Nov. 2, 2017, 1:51 p.m., Aaron Wood wrote: > > 3rdparty/stout/include/stout/windows/os.hpp > > Line 669 (original), 670 (patched) > > <https://reviews.apache.org/r/63268/diff/1/?file=1869640#file1869640line670> > > > > How about doing `if (job_handle.get_handle()) {` instead?
Loosely, because of [this](https://blogs.msdn.microsoft.com/oldnewthing/20040302-00/?p=40443). The invalidness of the underlying `HANDLE` value is inconsistent. You're right, I could do `if (!job_handle.get_handle())` for job object handles, but I'm trying to be explicit about what is or is not invalid, since other `HANDLE` checks will compare to `INVALID_HANDLE_VALUE`. Heck, there should probably be a note here that _this_ API represents invalid by `nullptr`. > On Nov. 2, 2017, 1:51 p.m., Aaron Wood wrote: > > 3rdparty/stout/include/stout/windows/os.hpp > > Line 715 (original), 716 (patched) > > <https://reviews.apache.org/r/63268/diff/1/?file=1869640#file1869640line716> > > > > Might be a bit cleaner to do `if (!result) {` Yeah, I'm not the hugest fan of the Windows `FALSE` value either. In new code, I've tried to avoid it be doing exactly that, just using `!`. We should probably write down some guidelines... - Andrew ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63268/#review189962 ----------------------------------------------------------- On Nov. 2, 2017, 1:39 p.m., Andrew Schwartzmeyer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63268/ > ----------------------------------------------------------- > > (Updated Nov. 2, 2017, 1:39 p.m.) > > > Review request for mesos, Aaron Wood, Akash Gupta, Jeff Coffler, Jie Yu, John > Kordich, Joseph Wu, and Michael Park. > > > Repository: mesos > > > Description > ------- > > This changes the CamelCase to snake_case per the style guide for stout. > It also adds `::` to uses of `::GetLastError` where it was missing, and > includes `<vector>` because it was used but missing. > > > Diffs > ----- > > 3rdparty/stout/include/stout/windows/os.hpp > 09ddec6d69472cd13b453fe1a77fdbe343fc23c8 > > > Diff: https://reviews.apache.org/r/63268/diff/1/ > > > Testing > ------- > > > Thanks, > > Andrew Schwartzmeyer > >
