diff options
author | Ted Gould <ted@gould.cx> | 2012-08-27 15:14:35 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-08-27 15:14:35 -0500 |
commit | 613d854fcdb84ab282e73ec2f51eea805a7cd0cd (patch) | |
tree | 4fed2e6f3eab07c70c79ceb82b5f33d93130ca2c /src | |
parent | 252858fc2596efd3f076c352337893dd794de15f (diff) | |
download | libpam-freerdp2-613d854fcdb84ab282e73ec2f51eea805a7cd0cd.tar.gz libpam-freerdp2-613d854fcdb84ab282e73ec2f51eea805a7cd0cd.tar.bz2 libpam-freerdp2-613d854fcdb84ab282e73ec2f51eea805a7cd0cd.zip |
Cleaning up the code to make it easier to read
Diffstat (limited to 'src')
-rw-r--r-- | src/pam-freerdp.c | 12 |
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); |