summaryrefslogtreecommitdiffstats
path: root/kdmlib/dmctl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdmlib/dmctl.cpp')
-rw-r--r--kdmlib/dmctl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kdmlib/dmctl.cpp b/kdmlib/dmctl.cpp
index 5f3bd26f0..255a7b2ea 100644
--- a/kdmlib/dmctl.cpp
+++ b/kdmlib/dmctl.cpp
@@ -77,8 +77,8 @@ DM::DM() : fd( -1 )
}
GDMAuthenticate();
} else {
- if ((ptr = (char*)strchr( dpy, ':' )))
- ptr = (char*)strchr( ptr, '.' );
+ if ((ptr = const_cast<char*>(strchr( dpy, ':' ))))
+ ptr = strchr( ptr, '.' );
snprintf( sa.sun_path, sizeof(sa.sun_path),
"%s/dmctl-%.*s/socket",
ctl, ptr ? int(ptr - dpy) : 512, dpy );