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 /sesman/session.c | |
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 'sesman/session.c')
-rw-r--r-- | sesman/session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sesman/session.c b/sesman/session.c index 28e00fc9..79128e5e 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -959,7 +959,7 @@ session_get_bypid(int pid) struct session_chain *tmp; struct session_item *dummy; - dummy = g_malloc(sizeof(struct session_item), 1); + dummy = g_new0(struct session_item, 1); if (0 == dummy) { @@ -1033,7 +1033,7 @@ session_get_byuser(char *user, int *cnt, unsigned char flags) } /* malloc() an array of disconnected sessions */ - sess = g_malloc(count *sizeof(struct SCP_DISCONNECTED_SESSION), 1); + sess = g_new0(struct SCP_DISCONNECTED_SESSION, count); if (sess == 0) { |