I think while (*(++buf2) != ':'); would be acceptable.