]> granicus.if.org Git - curl/commitdiff
compiler warning: fix
authorYang Tse <yangsita@gmail.com>
Thu, 2 Jun 2011 17:19:36 +0000 (19:19 +0200)
committerYang Tse <yangsita@gmail.com>
Thu, 2 Jun 2011 17:19:36 +0000 (19:19 +0200)
Fix compiler warning: cast increases required alignment

lib/ftp.c

index 0cf19a882a8cc26993de3cd6ccdacba64d06e89c..e9cca1b15e4c036dafa7877352e4d761cba4dc68 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -4006,14 +4006,14 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
         cur_pos = slash_pos + 1; /* jump to the rest of the string */
         if(++ftpc->dirdepth >= ftpc->diralloc) {
           /* enlarge array */
-          char *bigger;
+          char **bigger;
           ftpc->diralloc *= 2; /* double the size each time */
           bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0]));
           if(!bigger) {
             freedirs(ftpc);
             return CURLE_OUT_OF_MEMORY;
           }
-          ftpc->dirs = (char **)bigger;
+          ftpc->dirs = bigger;
         }
       }
     }