On Tue, 19 Mar 2019 16:35:28 +0000 Slavomir Kaslev <kaslevs@xxxxxxxxxx> wrote: > > + > > + snprintf(path, sizeof(path), "/proc/%s/task", guest_task); > > + dir = opendir(path); > > + if (!dir) > > + return; > > + > > + for (entry_t = readdir(dir); entry_t; entry_t = readdir(dir)) { > > Nit: `while ((entry = readdir(dir))) {` is more common throughout the code. Agreed. Although in a lot of cases I prefer for() over while(), in this case, when the initialization is identical to the next iteration, the while() is preferred. -- Steve
![]() |