Infinite loop in C | Hacker News Reader