Hi Mark, On Mon, Nov 7, 2022 at 9:19 AM Mark Wielaard <m...@klomp.org> wrote: > > if (rc == -EEXIST) > > { > > - /* The section should be found in the executable. */ > > + /* Either the debuginfo couldn't be found or the section should > > + be in the executable. */ > > fd = debuginfod_find_executable (client, build_id, > > build_id_len, &tmp_path); > > if (fd > 0) > > I know this is in existing code, so this might have missed in a > previous review. But shouldn't this be fd >= 0 ? > > That is what is checked in the rest of the code. Except for the > debuginfod_find_section function which uses fd >0 twice. > > It is unlikely, but I think fd can be zero if it (stdin) was closed by > the program for some reason. Then I think zero can be reused as new > file descriptor?
Thanks for catching this typo, will merge a fix. Aaron