aboutsummaryrefslogtreecommitdiff
path: root/src
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
commit613d854fcdb84ab282e73ec2f51eea805a7cd0cd (patch)
tree4fed2e6f3eab07c70c79ceb82b5f33d93130ca2c /src
parent252858fc2596efd3f076c352337893dd794de15f (diff)
downloadlibpam-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.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);