diff options
author | Nicola Ruggero <nicola@nxnt.org> | 2010-11-03 16:59:26 +0100 |
---|---|---|
committer | Nicola Ruggero <nicola@nxnt.org> | 2010-11-03 16:59:26 +0100 |
commit | 4cf06dbbcb8522be5fa069976c8f361fc874039f (patch) | |
tree | 6e074a89c4edadf9a75d648d1f9daf36079c03aa /xrdp/xrdp_wm.c | |
parent | 104f762e5d3dcd659415632f442e745cef5a3bf2 (diff) | |
download | xrdp-proprietary-4cf06dbbcb8522be5fa069976c8f361fc874039f.tar.gz xrdp-proprietary-4cf06dbbcb8522be5fa069976c8f361fc874039f.zip |
Major code cleanup:
- Initialized and zeroed out local variables
- Check for some null pointers
- Fixed some typos
- Other minor changes (beautify, etc.)
Diffstat (limited to 'xrdp/xrdp_wm.c')
-rw-r--r-- | xrdp/xrdp_wm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c index bae6c494..7500f38a 100644 --- a/xrdp/xrdp_wm.c +++ b/xrdp/xrdp_wm.c @@ -27,9 +27,12 @@ struct xrdp_wm* APP_CC xrdp_wm_create(struct xrdp_process* owner, struct xrdp_client_info* client_info) { - struct xrdp_wm* self; + struct xrdp_wm* self = (struct xrdp_wm *)NULL; char event_name[256]; - int pid; + int pid = 0; + + /* initialize (zero out) local variables: */ + g_memset(event_name,0,sizeof(char) * 256); self = (struct xrdp_wm*)g_malloc(sizeof(struct xrdp_wm), 1); self->client_info = client_info; |