spiral: Replace strncmp with memcmp when appropriate.