Gleydson Soares(gsoa...@gmail.com) on 2017.03.27 16:43:28 -0300: > > What about the other calls to calloc(3); shouldn't we keep their > > respective error messages consistent? > > seems that several err()/errx() calls in pfctl code are hard-coding > the function name... > > instead of hard code, maybe those calls should be changed to: > errx(1, "%s: anystring", __func__)
In this case i removed the function name, because this calloc will only fail on a bad day and then it does not really matter which calloc is the one oom. Printing the function name is useful in debug messages or in unusual failure cases where you need to differentiate between cases. So yeah, send a diff converting them to __func__, but its fine to remove the function name in simple cases like malloc/calloc too.