gdbserver/linux: take condition out of callback in find_lwp_pid
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 18 Nov 2022 16:09:11 +0000 (11:09 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Fri, 18 Nov 2022 16:09:11 +0000 (11:09 -0500)
commitd4895ba2df3bbf38d64fce314f5933d05eb8990a
tree7c86fc2fcc261c763f06fa57a3c31ea5d19418ed
parent6533cbeeb831224e2d2dd2a7bea54b22b798fa39
gdbserver/linux: take condition out of callback in find_lwp_pid

Just a small optimization, it's not necessary to recompute lwp at each
iteration.

While at it, change the variable type to long, as ptid_t::lwp returns a
long.

Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Change-Id: I181670ce1f90b59cb09ea4899367750be2ad9105
gdbserver/linux-low.cc