chiark / gitweb /
udev: link-config - use new0 instead of calloc
authorTom Gundersen <teg@jklm.no>
Tue, 29 Oct 2013 14:59:45 +0000 (15:59 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 29 Oct 2013 15:12:12 +0000 (16:12 +0100)
src/udev/net/link-config-parse.c

index 54dd57be598b3d781e5f77046432d7a411b4d9fd..c339d085522992bf3f8f19eaa0072d0717260444 100644 (file)
@@ -25,6 +25,7 @@
 #include "link-config.h"
 
 #include "utf8.h"
+#include "util.h"
 #include "conf-parser.h"
 
 static const char* const mac_policy_table[] = {
@@ -103,7 +104,7 @@ int config_parse_hwaddr(const char *unit,
         assert(rvalue);
         assert(data);
 
-        n = calloc(1, sizeof(struct ether_addr));
+        n = new0(struct ether_addr, 1);
         if (!n)
                 return log_oom();