summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2017-01-25 23:38:06 +0000
committerjsorg71 <jay.sorg@gmail.com>2017-02-02 21:24:50 -0800
commitea6882fd4c3842c531bc8e92fd33355a64f2615c (patch)
tree25d3c657912db3784c523d3f2be1ea3977dfd914 /sesman
parent0017081d78dafbea4602229898ed41e2d6ab6283 (diff)
downloadxrdp-proprietary-ea6882fd4c3842c531bc8e92fd33355a64f2615c.tar.gz
xrdp-proprietary-ea6882fd4c3842c531bc8e92fd33355a64f2615c.zip
xrdp-sesadmin: refactor array access
Diffstat (limited to 'sesman')
-rw-r--r--sesman/tools/sesadmin.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c
index b76b407e..272c0e95 100644
--- a/sesman/tools/sesadmin.c
+++ b/sesman/tools/sesadmin.c
@@ -206,10 +206,13 @@ void cmndList(struct SCP_CONNECTION *c)
{
for (idx = 0; idx < scnt; idx++)
{
- printf("%d\t%d\t%dx%dx%d\t%d-%d-%d\t%04d/%02d/%02d@%02d:%02d\n", \
- (dsl[idx]).SID, (dsl[idx]).type, (dsl[idx]).width, (dsl[idx]).height, (dsl[idx]).bpp, \
- (dsl[idx]).idle_days, (dsl[idx]).idle_hours, (dsl[idx]).idle_minutes, \
- (dsl[idx]).conn_year, (dsl[idx]).conn_month, (dsl[idx]).conn_day, (dsl[idx]).conn_hour, (dsl[idx]).conn_minute);
+ struct SCP_DISCONNECTED_SESSION *s = &dsl[idx];
+
+ printf("%d\t%d\t%dx%dx%d\t%d-%d-%d\t%04d/%02d/%02d@%02d:%02d\n",
+ s->SID, s->type, s->width, s->height, s->bpp,
+ s->idle_days, s->idle_hours, s->idle_minutes,
+ s->conn_year, s->conn_month, s->conn_day, s->conn_hour,
+ s->conn_minute);
}
}
else