udev: link-config - use new0 instead of calloc

This commit is contained in:
Tom Gundersen
2013-10-29 16:12:12 +01:00
parent dc7d8997aa
commit a12fa4204d
+2 -1
View 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();