]> granicus.if.org Git - curl/commitdiff
ftplistparser: fix LGTM alert "Empty block without comment"
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 5 Apr 2019 07:20:13 +0000 (09:20 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 5 Apr 2019 10:56:18 +0000 (12:56 +0200)
Removing the block is consistent with line 954/957.

Closes https://github.com/curl/curl/pull/3732

lib/ftplistparser.c

index 1b1de5c3cd76e66bfbd6f9bbc6668839f9146888..c4eb43732d0f5045de5f63811fd83ad7b0a74914 100644 (file)
@@ -914,10 +914,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
       case PL_WINNT_DIRORSIZE:
         switch(parser->state.NT.sub.dirorsize) {
         case PL_WINNT_DIRORSIZE_PRESPACE:
-          if(c == ' ') {
-
-          }
-          else {
+          if(c != ' ') {
             parser->item_offset = finfo->b_used - 1;
             parser->item_length = 1;
             parser->state.NT.sub.dirorsize = PL_WINNT_DIRORSIZE_CONTENT;