Change while(true) to for(;;) for fix compiler warning.