Skip to content

Commit 63e621e

Browse files
authored
replace bzero with calloc (#68)
1 parent 6f56563 commit 63e621e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/zos-tls.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ void *__tlsPtrFromAnchor(struct __tlsanchor *anchor, const void *initvalue) {
9494
}
9595
void * __tlsValue(tls_t *a) {
9696
void *val = NULL;
97-
char * initvalue = (char *)malloc(sizeof(char)*(a->sz));
97+
char *initvalue = (char *)calloc((sizeof(char)*(a->sz)), sizeof(char));
9898
assert(initvalue != NULL);
99-
bzero(initvalue,a->sz);
10099
val = __tlsPtrAlloc(a->sz, &(a->key), &(a->once),(void *)initvalue);
101100
free(initvalue);
102101
return val;

0 commit comments

Comments
 (0)