> What's wrong with a pointer to a static string? Since the strings are > > static, none of the callers can change them. Since they are just pointers, > they can be shared by any number of callers. The existing code doesn't always return a static string - sometimes it sprintfs one up... > > +const char *e2p_feature2string(int compat, unsigned int mask) > > +{ > > + static char buf[20]; > > + e2p_feature_to_string(compat, mask, buf, sizeof(buf) / sizeof(buf[0])); > > This is copying into a single shared buffer for all callers, which is > not thread safe. ... exactly. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html