Use g_new or g_new0 when C++ compiler would complain about implicit cast

This commit is contained in:
Pavel Roskin
2016-06-21 16:30:18 -07:00
parent a24df49241
commit 5829323ad8
18 changed files with 31 additions and 27 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ create_uds_client(struct trans *con)
{
return 0;
}
uds_client = g_malloc(sizeof(struct pcsc_uds_client), 1);
uds_client = g_new0(struct pcsc_uds_client, 1);
if (uds_client == 0)
{
return 0;
@@ -606,7 +606,7 @@ scard_process_list_readers(struct trans *con, struct stream *in_s)
g_free(groups);
return 1;
}
pcscListReaders = g_malloc(sizeof(struct pcsc_list_readers), 1);
pcscListReaders = g_new0(struct pcsc_list_readers, 1);
pcscListReaders->uds_client_id = uds_client->uds_client_id;
pcscListReaders->cchReaders = cchReaders;
scard_send_list_readers(pcscListReaders, lcontext->context,