summaryrefslogtreecommitdiffstats
path: root/xrdp/xrdp_mm.c
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-06-21 16:30:18 -0700
committerPavel Roskin <plroskin@gmail.com>2016-07-08 04:29:49 +0000
commit5829323ad88f8120730968cfe165e590a7fb2d59 (patch)
treeb5e13986d78de530a0a2168efdb95062e2803aca /xrdp/xrdp_mm.c
parenta24df49241adc7c49dff777742d668f1d6c690ad (diff)
downloadxrdp-proprietary-5829323ad88f8120730968cfe165e590a7fb2d59.tar.gz
xrdp-proprietary-5829323ad88f8120730968cfe165e590a7fb2d59.zip
Use g_new or g_new0 when C++ compiler would complain about implicit cast
Diffstat (limited to 'xrdp/xrdp_mm.c')
-rw-r--r--xrdp/xrdp_mm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index dfc04152..f1a01efa 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -764,7 +764,7 @@ xrdp_mm_process_rail_create_window(struct xrdp_mm* self, struct stream* s)
in_uint16_le(s, title_bytes);
if (title_bytes > 0)
{
- rwso.title_info = g_malloc(title_bytes + 1, 0);
+ rwso.title_info = g_new(char, title_bytes + 1);
in_uint8a(s, rwso.title_info, title_bytes);
rwso.title_info[title_bytes] = 0;
}
@@ -947,7 +947,7 @@ xrdp_mm_process_rail_update_window_text(struct xrdp_mm* self, struct stream* s)
g_memset(&rwso, 0, sizeof(rwso));
in_uint32_le(s, size); /* title size */
- rwso.title_info = g_malloc(size + 1, 0);
+ rwso.title_info = g_new(char, size + 1);
in_uint8a(s, rwso.title_info, size);
rwso.title_info[size] = 0;
g_writeln(" set window title %s size %d 0x%8.8x", rwso.title_info, size, flags);