Apparently the programmer didn't know that you could pass it NULL.
However, including the function name seems more informative.

ok?


Index: usr.sbin/netgroup_mkdb/util.c
===================================================================
RCS file: /cvs/src/usr.sbin/netgroup_mkdb/util.c,v
retrieving revision 1.6
diff -u -p -r1.6 util.c
--- usr.sbin/netgroup_mkdb/util.c       4 Mar 2012 04:05:15 -0000       1.6
+++ usr.sbin/netgroup_mkdb/util.c       6 Nov 2015 02:01:24 -0000
@@ -43,7 +43,7 @@ emalloc(size_t s)
 {
        void *ptr = malloc(s);
        if (ptr == NULL)
-               err(1, "%s", "");
+               err(1, "emalloc");
        return ptr;
 }
 
@@ -56,7 +56,7 @@ erealloc(void *p, size_t s)
 {
        void *ptr = realloc(p, s);
        if (ptr == NULL)
-               err(1, "%s", "");
+               err(1, "emalloc");
        return ptr;
 }
 

Reply via email to