summaryrefslogtreecommitdiffstats
path: root/sesman/libscp/libscp_v1c.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 /sesman/libscp/libscp_v1c.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 'sesman/libscp/libscp_v1c.c')
-rw-r--r--sesman/libscp/libscp_v1c.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sesman/libscp/libscp_v1c.c b/sesman/libscp/libscp_v1c.c
index 7d1b9db8..7bc9a1d3 100644
--- a/sesman/libscp/libscp_v1c.c
+++ b/sesman/libscp/libscp_v1c.c
@@ -224,7 +224,7 @@ scp_v1c_get_session_list(struct SCP_CONNECTION *c, int *scount,
in_uint32_be(c->in_s, sescnt);
sestmp = sescnt;
- ds = g_malloc(sizeof(struct SCP_DISCONNECTED_SESSION) * sescnt, 0);
+ ds = g_new(struct SCP_DISCONNECTED_SESSION, sescnt);
if (ds == 0)
{
@@ -429,7 +429,7 @@ _scp_v1c_check_response(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
g_free(s->errstr);
}
- s->errstr = g_malloc(dim + 1, 0);
+ s->errstr = g_new(char, dim + 1);
if (s->errstr == 0)
{
@@ -450,7 +450,7 @@ _scp_v1c_check_response(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
g_free(s->errstr);
}
- s->errstr = g_malloc(dim + 1, 0);
+ s->errstr = g_new(char, dim + 1);
if (s->errstr == 0)
{
@@ -471,7 +471,7 @@ _scp_v1c_check_response(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
g_free(s->errstr);
}
- s->errstr = g_malloc(dim + 1, 0);
+ s->errstr = g_new(char, dim + 1);
if (s->errstr == 0)
{