Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes: > -static inline char* xstrdup(const char *str) > -{ > - char *ret = strdup(str); > - if (!ret) { > - release_pack_memory(strlen(str) + 1, -1); > - ret = strdup(str); > - if (!ret) > - die("Out of memory, strdup failed"); > - } > - return ret; > -} Wouldn't it be better to split that kind of function into two parts: - inline the short common case - put the special case apart like static inline char* xstrdup(const char *str) { char *ret = strdup(str); if (!ret) return xstrdup_failed(str); else return ret; } (with xstrdup_failed not being inline.) ? -- Matthieu -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html