Ramkumar Ramachandra wrote: > int len = strchrnul(p, '\n') - p; > if (len > 255 || len - strchrnul(p, '\n') + p != 0) > len = 255; Yuck. Why not just use a size_t? > Shouldn't it be part of error() atleast in the long term? The default implementation of error() is (practically speaking) a thin wrapper around fprintf. What are the new semantics you are proposing --- truncating %s arguments to one short line? I don't think that would be a good idea, since for example, some current callers might be passing "\n" explicitly as a %s argument. -- 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