diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-06-21 16:30:18 -0700 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-07-08 04:29:49 +0000 |
commit | 5829323ad88f8120730968cfe165e590a7fb2d59 (patch) | |
tree | b5e13986d78de530a0a2168efdb95062e2803aca /xrdp | |
parent | a24df49241adc7c49dff777742d668f1d6c690ad (diff) | |
download | xrdp-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')
-rw-r--r-- | xrdp/xrdp_mm.c | 4 | ||||
-rw-r--r-- | xrdp/xrdp_wm.c | 2 |
2 files changed, 3 insertions, 3 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); diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index 3bb326f3..548742ac 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -62,7 +62,7 @@ xrdp_wm_create(struct xrdp_process *owner, self->current_surface_index = 0xffff; /* screen */ /* to store configuration from xrdp.ini */ - self->xrdp_config = g_malloc(sizeof(struct xrdp_config), 1); + self->xrdp_config = g_new0(struct xrdp_config, 1); return self; } |