strnstr -> strstr as the former is non-standard (thanks Bertrand!)
remove an unused variable