Ha, nah its not because you are returning.
glutMainLoop is an infinite loop for rendering and updating. what you are going to want to do is:
displayfun1(){}
reshapefun1(){}
displayfun2(){}
reshapefun2(){}
int main(...)
{
glutCreateWindow (...);
glutDisplayFunc (displayfun);
glutReshapeFunc (reshapefun);
glutMainLoop ();
return 0;
}
displayfun
{
int randomFunction = rand() % 2;
if(randomFunction)
DrawImage1();
else
DrawImage2();
}