Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes: > Just removing the line would work with the current code, but this "if > (errno <= 0) errno = EINVAL;" allows enforcing the invariant that > errno > 0 when reaching "return -1" in a simple and reliable way (i.e. > changing the for loop later cannot break this invariant by mistake). I do not think "errno > 0 when -1 is returned" is a meaningful invariant. You may return EINVAL which is positive and that may keep that invariant, but you should not be returning that errno unless the error is "template not ending with 6-X" to begin with, so there isn't a real gain, no? -- 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