From: Daniel Stenberg Date: Mon, 6 Oct 2014 06:49:43 +0000 (+0200) Subject: ssh_statemach_act: split out assignment from check X-Git-Tag: curl-7_39_0~180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4bc31df3e4cc5d3ae25e5f65f49d6b71d69a97c3;p=thirdparty%2Fcurl.git ssh_statemach_act: split out assignment from check just a minor code style thing to make the code clearer --- diff --git a/lib/ssh.c b/lib/ssh.c index f468e4c848..6a71a875de 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -1793,7 +1793,8 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) break; case SSH_SFTP_CREATE_DIRS: - if((sshc->slash_pos = strchr(sshc->slash_pos, '/')) != NULL) { + sshc->slash_pos = strchr(sshc->slash_pos, '/'); + if(sshc->slash_pos) { *sshc->slash_pos = 0; infof(data, "Creating directory '%s'\n", sftp_scp->path);