aboutsummaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-12-29 01:35:09 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-12-29 01:35:09 -0500
commit4595ada2f69b42670c85a63c7d2344af63f2afe7 (patch)
tree0d528d8177aceefcf74fb7306fc0fc7cc3c41ece /src/install.c
parent8ae4f8f5985445b1ce3547975f407847c0fee0f7 (diff)
downloadspmc-4595ada2f69b42670c85a63c7d2344af63f2afe7.tar.gz
Minor fixes:
* size_t in place of int * Moved some variables closer to their execution scope * Add some error checks
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c
index 8f56363..1fb4513 100644
--- a/src/install.c
+++ b/src/install.c
@@ -77,7 +77,7 @@ int install(const char *destroot, const char *_package) {
chdir(tmpdir);
{
// Rewrite binary prefixes
- RelocationEntry **b_record = prefixes_read(SPM_META_PREFIX_BIN);
+ b_record= prefixes_read(SPM_META_PREFIX_BIN);
if (b_record) {
for (int i = 0; b_record[i] != NULL; i++) {
relocate(b_record[i]->path, b_record[i]->prefix, destroot);
@@ -85,7 +85,7 @@ int install(const char *destroot, const char *_package) {
}
// Rewrite text prefixes
- RelocationEntry **t_record = prefixes_read(SPM_META_PREFIX_TEXT);
+ t_record = prefixes_read(SPM_META_PREFIX_TEXT);
if (t_record) {
for (int i = 0; t_record[i] != NULL; i++) {
file_replace_text(t_record[i]->path, t_record[i]->prefix, destroot);