>>179
if (*p == (unsigned char)0xff)
こうすればどうよ?