]> granicus.if.org Git - curl/commitdiff
ssh_statemach_act: split out assignment from check
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2014 06:49:43 +0000 (08:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2014 06:49:43 +0000 (08:49 +0200)
just a minor code style thing to make the code clearer

lib/ssh.c

index f468e4c8487f5b295e6e7aac4151a5e536660437..6a71a875de1b7a47481b13e3783717de7406c439 100644 (file)
--- 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);