summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-11-25 19:43:31 +0000
committerjbj <devnull@localhost>1998-11-25 19:43:31 +0000
commit469f309419c1cd9da52327bc0aa6905a5fab6a42 (patch)
treefee541495bf1df7280ec8b50bed1728adf3b19f4 /build
parent65f24cffd10f55f6fa818412a3c1d44fab9d099a (diff)
downloadrpm-469f309419c1cd9da52327bc0aa6905a5fab6a42.tar.gz
rpm-469f309419c1cd9da52327bc0aa6905a5fab6a42.tar.bz2
rpm-469f309419c1cd9da52327bc0aa6905a5fab6a42.zip
Sanity.
CVS patchset: 2560 CVS date: 1998/11/25 19:43:31
Diffstat (limited to 'build')
-rw-r--r--build/files.c41
1 files changed, 9 insertions, 32 deletions
diff --git a/build/files.c b/build/files.c
index 828fc8727..cc6b00a49 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1120,16 +1120,9 @@ static int processPackageFiles(Spec spec, Package pkg,
fl.passedSpecialDoc = 0;
- fl.cur_ar.ar_fmodestr = NULL;
- fl.cur_ar.ar_dmodestr = NULL;
- fl.cur_ar.ar_user = NULL;
- fl.cur_ar.ar_group = NULL;
- fl.def_ar.ar_fmodestr = NULL;
- fl.def_ar.ar_dmodestr = NULL;
- fl.def_ar.ar_user = NULL;
- fl.def_ar.ar_group = NULL;
- fl.def_ar.ar_fmode = 0;
- fl.def_ar.ar_dmode = 0;
+ fl.cur_ar = empty_ar; /* structure assignment */
+ fl.def_ar = empty_ar; /* structure assignment */
+
fl.currentLang = NULL;
fl.defVerifyFlags = RPMVERIFY_ALL;
@@ -1164,23 +1157,11 @@ static int processPackageFiles(Spec spec, Package pkg,
fl.inFtw = 0;
fl.currentFlags = 0;
fl.currentVerifyFlags = fl.defVerifyFlags;
- fl.cur_ar.ar_fmode = fl.def_ar.ar_fmode;
- fl.cur_ar.ar_dmode = fl.def_ar.ar_dmode;
fl.isSpecialDoc = 0;
- FREE(fl.cur_ar.ar_fmodestr);
- FREE(fl.cur_ar.ar_dmodestr);
- FREE(fl.cur_ar.ar_user);
- FREE(fl.cur_ar.ar_group);
+ dupAttrRec(&fl.def_ar, &fl.cur_ar);
+
FREE(fl.currentLang);
- if (fl.def_ar.ar_fmodestr)
- fl.cur_ar.ar_fmodestr = strdup(fl.def_ar.ar_fmodestr);
- if (fl.def_ar.ar_dmodestr)
- fl.cur_ar.ar_dmodestr = strdup(fl.def_ar.ar_dmodestr);
- if (fl.def_ar.ar_user)
- fl.cur_ar.ar_user = strdup(fl.def_ar.ar_user);
- if (fl.def_ar.ar_group)
- fl.cur_ar.ar_group = strdup(fl.def_ar.ar_group);
if (parseForVerify(buf, &fl))
continue;
@@ -1248,14 +1229,10 @@ static int processPackageFiles(Spec spec, Package pkg,
/* Clean up */
FREE(fl.prefix);
- FREE(fl.cur_ar.ar_fmodestr);
- FREE(fl.cur_ar.ar_dmodestr);
- FREE(fl.cur_ar.ar_user);
- FREE(fl.cur_ar.ar_group);
- FREE(fl.def_ar.ar_fmodestr);
- FREE(fl.def_ar.ar_dmodestr);
- FREE(fl.def_ar.ar_user);
- FREE(fl.def_ar.ar_group);
+
+ freeAttrRec(&fl.cur_ar);
+ freeAttrRec(&fl.def_ar);
+
FREE(fl.currentLang);
freeFileList(fl.fileList, fl.fileListRecsUsed);
while (fl.docDirCount--) {