2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

Add new function xzalloc(n) as a shorthand for xcalloc(1, n).

This commit is contained in:
Ben Pfaff
2009-09-28 13:56:42 -07:00
parent ac718c9dbd
commit ec6fde61c8
22 changed files with 33 additions and 26 deletions

View File

@@ -219,7 +219,7 @@ create_dp_netdev(const char *name, int dp_idx, struct dpif **dpifp)
}
/* Create datapath. */
dp_netdevs[dp_idx] = dp = xcalloc(1, sizeof *dp);
dp_netdevs[dp_idx] = dp = xzalloc(sizeof *dp);
list_push_back(&dp_netdev_list, &dp->node);
dp->dp_idx = dp_idx;
dp->open_cnt = 0;
@@ -788,7 +788,7 @@ add_flow(struct dpif *dpif, struct odp_flow *odp_flow)
struct dp_netdev_flow *flow;
int error;
flow = xcalloc(1, sizeof *flow);
flow = xzalloc(sizeof *flow);
flow->key = odp_flow->key;
flow->key.reserved = 0;