URI: 
       tRemove dynamic allocation from local_load() - repo - list/download/sync packs with remote repositories
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit be9bf8a9d75a32005bdd5cb7f9d50b04416f84a6
   DIR parent 3f6ad1133fe13890816944190faf7a5665c1fef5
  HTML Author: z3bra <contactatz3bradotorg>
       Date:   Thu, 15 Dec 2016 17:32:39 +0100
       
       Remove dynamic allocation from local_load()
       
       Diffstat:
         M repo.c                              |      13 ++-----------
       
       1 file changed, 2 insertions(+), 11 deletions(-)
       ---
   DIR diff --git a/repo.c b/repo.c
       t@@ -89,24 +89,15 @@ add_repo(struct repos *rlist, char *url)
        int
        local_load(struct packs *plist, char *local)
        {
       -        ssize_t len = 0;
       -        char *fn;
       +        char fn[PATH_MAX] = "";
                char buf[LINE_MAX] = "";
                struct pack *p = NULL;
                FILE *list;
        
       -        len = strlen(local) + strlen(LISTFILE);
       -        fn = malloc(len + 1);
       -        if (!fn) {
       -                perror("malloc");
       -                return -1;
       -        }
       -        snprintf(fn, len + 1, "%s%s", local, LISTFILE);
       -        fn[len] = 0;
       +        snprintf(fn, PATH_MAX, "%s/%s", local, LISTFILE);
                list = fopen(fn, "r");
                if (!list) {
                        perror(fn);
       -                free(fn);
                        exit(1);
                }