diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-07 01:45:07 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-03-07 01:45:07 -0500 |
commit | 2a9eaa0aa4a046bb2dfd4c2aeb1ebbdcff0770b9 (patch) | |
tree | 374904f82f827222746c8a4ca40664eba6641d7f /src/spm.c | |
parent | e6d43d723b75ffc489f436238459175eab49d895 (diff) | |
download | spmc-2a9eaa0aa4a046bb2dfd4c2aeb1ebbdcff0770b9.tar.gz |
Refactor RPATH creation:
* Decreased complexity
* Most rpath_* functions accept a FSTree structure now
* Fewer calls to chdir() overall
* Deeply nested libraries are detected
* Libraries are no longer confined to lib/ and /lib64
Diffstat (limited to 'src/spm.c')
-rw-r--r-- | src/spm.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -29,9 +29,7 @@ void usage(const char *program_name) { } int main(int argc, char *argv[], char *arge[]) { - char program_name[strlen(argv[0]) + 1]; - memset(program_name, '\0', sizeof(program_name) + 1); - strcpy(program_name, basename(argv[0])); + char *program_name = strdup(basename(argv[0])); // not much to see here yet // at the moment this will all be random tests, for better or worse @@ -320,5 +318,6 @@ int main(int argc, char *argv[], char *arge[]) { strlist_free(packages); manifestlist_free(mf); spm_hierarchy_free(rootfs); + free(program_name); return 0; } |