It is better to change the last line:

return 0; to return 1; // or something else which is larger than 0 for time continue