From 470ec29b0db526c1592f6a270652657315efddca Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 26 Jun 2009 20:25:23 +0200 Subject: use taloc_zero() rather than talloc() and explisit memset() --- openbsc/src/abis_nm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'openbsc/src/abis_nm.c') diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c index 4a73930fc..b07aa3116 100644 --- a/openbsc/src/abis_nm.c +++ b/openbsc/src/abis_nm.c @@ -2079,12 +2079,11 @@ static int bs11_read_swl_file(struct abis_nm_bs11_sw *bs11_sw) if (rc < 2) continue; - fle = talloc(tall_fle_ctx, struct file_list_entry); + fle = talloc_zero(tall_fle_ctx, struct file_list_entry); if (!fle) { rc = -ENOMEM; goto out; } - memset(fle, 0, sizeof(*fle)); /* construct new filename */ strncpy(dir, bs11_sw->swl_fname, sizeof(dir)); -- cgit v1.2.3