pidgin/pidgin

Remove needless allocation casts

2015-12-21, Michael McConville
9e56dcafff40
Parents b7ca07c50ef1
Children 7f8a2f301a82
Remove needless allocation casts
--- a/libpurple/protocols/oscar/family_icq.c Mon Dec 21 15:12:18 2015 -0500
+++ b/libpurple/protocols/oscar/family_icq.c Mon Dec 21 15:15:47 2015 -0500
@@ -254,7 +254,7 @@
byte_stream_destroy(&bs);
/* Keep track of this request and the ICQ number and request ID */
- info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1);
+ info = g_new0(struct aim_icq_info, 1);
info->reqid = snacid;
info->uin = atoi(uin);
od->icq_info = g_slist_prepend(od->icq_info, info);
@@ -301,7 +301,7 @@
byte_stream_destroy(&bs);
/* Keep track of this request and the ICQ number and request ID */
- info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1);
+ info = g_new0(struct aim_icq_info, 1);
info->reqid = snacid;
info->uin = atoi(uin);
info->for_auth_request = for_auth_request;
@@ -472,7 +472,7 @@
/* find other data from the same request */
info_ptr = g_slist_find_custom(od->icq_info, &reqid, compare_icq_infos);
if (!info_ptr) {
- struct aim_icq_info *new_info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1);
+ struct aim_icq_info *new_info = g_new0(struct aim_icq_info, 1);
new_info->reqid = reqid;
info_ptr = od->icq_info = g_slist_prepend(od->icq_info, new_info);
}
@@ -541,7 +541,7 @@
case 0x00eb: { /* email address(es) */
int i;
info->numaddresses = byte_stream_getle16(&qbs);
- info->email2 = (char **)g_new0(char *, info->numaddresses);
+ info->email2 = g_new0(char *, info->numaddresses);
for (i = 0; i < info->numaddresses; i++) {
info->email2[i] = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs));
if (i+1 != info->numaddresses)
--- a/libpurple/server.c Mon Dec 21 15:12:18 2015 -0500
+++ b/libpurple/server.c Mon Dec 21 15:15:47 2015 -0500
@@ -103,7 +103,7 @@
tmp = tmp->next;
}
- lar = (struct last_auto_response *)g_new0(struct last_auto_response, 1);
+ lar = g_new0(struct last_auto_response, 1);
g_snprintf(lar->name, sizeof(lar->name), "%s", name);
lar->gc = gc;
lar->sent = 0;