aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_methods.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-07 14:51:38 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-08 09:42:07 (GMT)
commitfaebdeaa9ea5aefc7e45c4d52710c5d67cdbc89f (patch)
tree107bd847a065aa15843a8571d809a61281ee61bd /src/eap_peer/eap_methods.c
parent33d0b1579be38d81752eb7bc8dd80c94e85f52ec (diff)
downloadhostap-faebdeaa9ea5aefc7e45c4d52710c5d67cdbc89f.zip
hostap-faebdeaa9ea5aefc7e45c4d52710c5d67cdbc89f.tar.gz
hostap-faebdeaa9ea5aefc7e45c4d52710c5d67cdbc89f.tar.bz2
Use os_calloc() instead of os_zalloc()
Automatic changes with spatch using the following semantic patch: @@ constant C; type T; @@ - os_zalloc(C*sizeof(T)) + os_calloc(C,sizeof(T)) @@ expression E; type T; @@ - os_zalloc((E)*sizeof(T)) + os_calloc(E,sizeof(T)) Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer/eap_methods.c')
-rw-r--r--src/eap_peer/eap_methods.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eap_peer/eap_methods.c b/src/eap_peer/eap_methods.c
index 83a1457..4998567 100644
--- a/src/eap_peer/eap_methods.c
+++ b/src/eap_peer/eap_methods.c
@@ -133,7 +133,7 @@ char ** eap_get_names_as_string_array(size_t *num)
for (m = eap_methods; m; m = m->next)
array_len++;
- array = os_zalloc(sizeof(char *) * (array_len + 1));
+ array = os_calloc(array_len + 1, sizeof(char *));
if (array == NULL)
return NULL;