summaryrefslogtreecommitdiffstats
path: root/kdm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-15 21:36:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-15 21:36:27 +0000
commitd54ab5595153b3dc57560077ff3551ffd4406b30 (patch)
tree9c48320521bf9ec3cb310c4046289d5a28ec3213 /kdm
parent4b12a38f6e566f44f5549b4a85e3ae9e715e0d08 (diff)
downloadtdebase-d54ab5595153b3dc57560077ff3551ffd4406b30.tar.gz
tdebase-d54ab5595153b3dc57560077ff3551ffd4406b30.zip
Fix a number of issues in kdebase caused by C style casts
This includes Bug #492 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1247425 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm')
-rw-r--r--kdm/backend/auth.c2
-rw-r--r--kdm/backend/client.c4
-rw-r--r--kdm/backend/dm.c2
-rw-r--r--kdm/backend/process.c2
-rw-r--r--kdm/backend/sessreg.c4
-rw-r--r--kdm/backend/util.c2
-rw-r--r--kdm/backend/xdmcp.c6
-rw-r--r--kdm/kfrontend/genkdmconf.c4
-rw-r--r--kdm/kfrontend/kdmctl.c2
9 files changed, 14 insertions, 14 deletions
diff --git a/kdm/backend/auth.c b/kdm/backend/auth.c
index 3fb18ac4c..bd183142c 100644
--- a/kdm/backend/auth.c
+++ b/kdm/backend/auth.c
@@ -944,7 +944,7 @@ setAuthNumber( Xauth *auth, const char *name )
colon = strrchr( name, ':' );
if (colon) {
++colon;
- dot = (char*)strchr( colon, '.' );
+ dot = strchr( colon, '.' );
if (dot)
auth->number_length = dot - colon;
else
diff --git a/kdm/backend/client.c b/kdm/backend/client.c
index 0807b2ce7..56d9fa09f 100644
--- a/kdm/backend/client.c
+++ b/kdm/backend/client.c
@@ -376,7 +376,7 @@ doPAMAuth( const char *psrv, struct pam_data *pdata )
V_RET_FAIL( 0 );
}
if ((td->displayType & d_location) == dForeign) {
- char *cp = (char*)strchr( td->name, ':' );
+ char *cp = strchr( td->name, ':' );
*cp = 0;
pretc = pam_set_item( pamh, PAM_RHOST, td->name );
*cp = ':';
@@ -566,7 +566,7 @@ Verify( GConvFunc gconv, int rootok )
char *tmpch;
strncpy( hostname, td->name, sizeof(hostname) - 1 );
hostname[sizeof(hostname)-1] = '\0';
- if ((tmpch = (char*)strchr( hostname, ':' )))
+ if ((tmpch = strchr( hostname, ':' )))
*tmpch = '\0';
} else
hostname[0] = '\0';
diff --git a/kdm/backend/dm.c b/kdm/backend/dm.c
index a372686df..d372dd472 100644
--- a/kdm/backend/dm.c
+++ b/kdm/backend/dm.c
@@ -133,7 +133,7 @@ main( int argc, char **argv )
memcpy( name, argv[0], len + 1 );
*--name = '/';
do {
- if (!(pathe = (char*)strchr( path, ':' )))
+ if (!(pathe = strchr( path, ':' )))
pathe = path + strlen( path );
len = pathe - path;
if (!len || (len == 1 && *path == '.')) {
diff --git a/kdm/backend/process.c b/kdm/backend/process.c
index 8e21d789b..f9d34fe7f 100644
--- a/kdm/backend/process.c
+++ b/kdm/backend/process.c
@@ -276,7 +276,7 @@ locate( const char *exe )
memcpy( name, exe, len + 1 );
*--name = '/';
do {
- if (!(pathe = (char*)strchr( path, ':' )))
+ if (!(pathe = strchr( path, ':' )))
pathe = path + strlen( path );
len = pathe - path;
if (len && !(len == 1 && *path == '.')) {
diff --git a/kdm/backend/sessreg.c b/kdm/backend/sessreg.c
index e603ff4c6..b507f8141 100644
--- a/kdm/backend/sessreg.c
+++ b/kdm/backend/sessreg.c
@@ -134,7 +134,7 @@ sessreg( struct display *d, int pid, const char *user, int uid )
}
ut_ent.ut_time = time( 0 );
- colon = (char*)strchr( d->name, ':' );
+ colon = strchr( d->name, ':' );
clen = strlen( colon );
if (clen > (int)(sizeof(ut_ent.ut_line) - UTL_OFF) - 2)
return; /* uhm, well ... */
@@ -175,7 +175,7 @@ sessreg( struct display *d, int pid, const char *user, int uid )
colon = d->name;
left = 0;
} else {
- dot = (char*)strchr( d->name, '.' );
+ dot = strchr( d->name, '.' );
if (dot && dot - d->name < left) {
memcpy( ut_ent.ut_line + UTL_OFF, d->name, left - 1 );
ut_ent.ut_line[UTL_OFF + left - 1] = '~';
diff --git a/kdm/backend/util.c b/kdm/backend/util.c
index b980862f1..7dd58f031 100644
--- a/kdm/backend/util.c
+++ b/kdm/backend/util.c
@@ -413,7 +413,7 @@ putEnv( const char *string, char **env )
char *n;
char *b;
- if (!(b = (char*)strchr( string, '=' )))
+ if (!(b = strchr( string, '=' )))
return NULL;
if (!StrNDup( &n, string, b - string ))
return NULL;
diff --git a/kdm/backend/xdmcp.c b/kdm/backend/xdmcp.c
index e82305f89..6abaf5fc8 100644
--- a/kdm/backend/xdmcp.c
+++ b/kdm/backend/xdmcp.c
@@ -395,8 +395,8 @@ NetworkAddressToName( CARD16 connectionType, ARRAY8Ptr connectionAddress,
* this is as useful, and will confuse more
* people
*/
- if ((localDot = (char*)strchr( localhost, '.' )) &&
- (remoteDot = (char*)strchr( hostname, '.' )))
+ if ((localDot = strchr( localhost, '.' )) &&
+ (remoteDot = strchr( hostname, '.' )))
{
/* smash the name in place; it won't
* be needed later.
@@ -1099,7 +1099,7 @@ NetworkAddressToHostname( CARD16 connectionType, ARRAY8Ptr connectionAddress )
oki:
if (StrDup( &name, he->h_name ) &&
!strchr( name, '.' ) &&
- (myDot = (char*)strchr( localHostname(), '.' )))
+ (myDot = strchr( localHostname(), '.' )))
{
if (ASPrintf( &lname, "%s%s", name, myDot )) {
#if defined(IPv6) && defined(AF_INET6)
diff --git a/kdm/kfrontend/genkdmconf.c b/kdm/kfrontend/genkdmconf.c
index f0981afe8..d10fe754b 100644
--- a/kdm/kfrontend/genkdmconf.c
+++ b/kdm/kfrontend/genkdmconf.c
@@ -332,7 +332,7 @@ locate( const char *exe )
memcpy( name, exe, len + 1 );
*--name = '/';
do {
- if (!(pathe = (char*)strchr( path, ':' )))
+ if (!(pathe = strchr( path, ':' )))
pathe = path + strlen( path );
len = pathe - path;
if (len && !(len == 1 && *path == '.')) {
@@ -1345,7 +1345,7 @@ mk_willing( Entry *ce, Section *cs ATTR_UNUSED )
if (!ce->active) /* there is only the Global one */
goto dflt;
else {
- if (!(fname = (char*)strchr( ce->value, '/' )))
+ if (!(fname = strchr( ce->value, '/' )))
return; /* obviously in-line (or empty) */
if (old_scripts || inNewDir( fname ))
dlinkfile( fname );
diff --git a/kdm/kfrontend/kdmctl.c b/kdm/kfrontend/kdmctl.c
index 82a12e653..72e133162 100644
--- a/kdm/kfrontend/kdmctl.c
+++ b/kdm/kfrontend/kdmctl.c
@@ -219,7 +219,7 @@ main( int argc, char **argv )
fprintf( stderr, "Cannot create UNIX socket\n" );
return 1;
}
- if (dpy && (ptr = (char*)strchr( dpy, ':' )) && (ptr = (char*)strchr( ptr, '.' )))
+ if (dpy && (ptr = strchr( dpy, ':' )) && (ptr = strchr( ptr, '.' )))
*ptr = 0;
if (ctl && *ctl) {
if (!openctl( fd, 1, ctl, dpy ))