On Thu, Aug 20, 2020 at 3:38 PM Yonghong Song <yhs@xxxxxx> wrote: > > > + int fd = ret; > > + > > + ret = -errno; > > libbpf_strerror_r understands positive and negative errno, so no need > "ret = -errno". I don't understand this one. The use of ret = -errno here is that when we goto out later we return a -errno. If this line is removed then fd is returned after fd is closed, in the case of a bind map failure, without writing to *pfd. Am I misunderstanding something? YiFei Zhu