aboutsummaryrefslogtreecommitdiff
path: root/src/pam-freerdp.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-27 15:14:35 -0500
committerTed Gould <ted@gould.cx>2012-08-27 15:14:35 -0500
commit8a85c086263fda4baea7128592fefedb61f83aee (patch)
tree4fed2e6f3eab07c70c79ceb82b5f33d93130ca2c /src/pam-freerdp.c
parent1708318511cf61c58913e8f14a8fb56ff1510bdd (diff)
downloadlibpam-x2go-8a85c086263fda4baea7128592fefedb61f83aee.tar.gz
libpam-x2go-8a85c086263fda4baea7128592fefedb61f83aee.tar.bz2
libpam-x2go-8a85c086263fda4baea7128592fefedb61f83aee.zip
Cleaning up the code to make it easier to read
Diffstat (limited to 'src/pam-freerdp.c')
-rw-r--r--src/pam-freerdp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pam-freerdp.c b/src/pam-freerdp.c
index 0277e0c..d1a6578 100644
--- a/src/pam-freerdp.c
+++ b/src/pam-freerdp.c
@@ -88,14 +88,14 @@ get_item (pam_handle_t * pamh, int type)
free(responses);
if (type == PAM_RHOST) {
- char * subloc = NULL;
- if ((subloc = strstr(retval, "://")) != NULL) {
+ char * subloc = strstr(retval, "://");
+ if (subloc != NULL) {
char * original = retval;
- char * newish = retval + strlen("://");
- char * c = strstr(newish, "/");
+ char * newish = subloc + strlen("://");
+ char * endslash = strstr(newish, "/");
- if (c != NULL) {
- c[0] = '\0';
+ if (endslash != NULL) {
+ endslash[0] = '\0';
}
retval = strdup(newish);