From 8a85c086263fda4baea7128592fefedb61f83aee Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 27 Aug 2012 15:14:35 -0500 Subject: Cleaning up the code to make it easier to read --- src/pam-freerdp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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); -- cgit v1.2.3