On Fri, Apr 13, 2018 at 03:04:21PM -0700, Richard Cochran wrote: > On Fri, Apr 13, 2018 at 05:11:59PM +0200, Miroslav Lichvar wrote: > > @@ -1148,6 +1148,8 @@ static int auto_init_ports(struct node *node, int > > add_rt) > > char iface[IFNAMSIZ]; > > > > while (1) { > > + if (!is_running()) > > + return -1; > > Why not this? > > while (is_running()) { > ... > }
That would stop the while loop, but not prevent the code following the loop from running, which would add more delay to exiting and print a confusing message "failed to get number of ports". -- Miroslav Lichvar ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel