Use g_new or g_new0 when C++ compiler would complain about implicit cast
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user