diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-05-14 10:00:13 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-05-14 10:00:13 +0300 |
commit | 9a0f820ffc42010da544bdee1758a3c0f6a83aed (patch) | |
tree | c0aa5b645fa62f4f173c7d7762854a066eee78dc | |
parent | 71f77a948873d0b3ee11cbf6e8f2b69d28cae0b7 (diff) | |
download | librpm-tizen-9a0f820ffc42010da544bdee1758a3c0f6a83aed.tar.gz librpm-tizen-9a0f820ffc42010da544bdee1758a3c0f6a83aed.tar.bz2 librpm-tizen-9a0f820ffc42010da544bdee1758a3c0f6a83aed.zip |
Eliminate redundant filelist initializiation
- The file list gets zeroed out with memset(), eliminating all this
noise lets the actually necessary initialization tasks more obvious.
-rw-r--r-- | build/files.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/build/files.c b/build/files.c index acbca9797..81a9fd7c9 100644 --- a/build/files.c +++ b/build/files.c @@ -1781,41 +1781,16 @@ static rpmRC processPackageFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags, /* XXX spec->buildRoot == NULL, then xstrdup("") is returned */ fl.buildRoot = rpmGenPath(spec->rootDir, spec->buildRoot, NULL); - fl.processingFailed = 0; - - fl.cur.isDir = 0; - fl.cur.attrFlags = 0; - fl.cur.verifyFlags = 0; - - fl.cur.devtype = 0; - fl.cur.devmajor = 0; - fl.cur.devminor = 0; - - nullAttrRec(&fl.cur.ar); - nullAttrRec(&fl.def.ar); dupAttrRec(&root_ar, &fl.def.ar); /* XXX assume %defattr(-,root,root) */ - fl.def.verifyFlags = RPMVERIFY_ALL; - fl.cur.langs = NULL; - fl.haveCaps = 0; - fl.cur.caps = NULL; - - fl.cur.specdFlags = 0; - fl.def.specdFlags = 0; - fl.largeFiles = 0; fl.pkgFlags = pkgFlags; - fl.docDirs = NULL; { char *docs = rpmGetPath("%{?__docdir_path}", NULL); argvSplit(&fl.docDirs, docs, ":"); free(docs); } - fl.fileList = NULL; - fl.fileListRecsAlloced = 0; - fl.fileListRecsUsed = 0; - for (ARGV_const_t fp = pkg->fileList; *fp != NULL; fp++) { char buf[strlen(*fp) + 1]; const char *s = *fp; @@ -1987,10 +1962,7 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags) free(a); } fl.fileList = xcalloc((spec->numSources + 1), sizeof(*fl.fileList)); - fl.processingFailed = 0; - fl.fileListRecsUsed = 0; fl.pkgFlags = pkgFlags; - fl.buildRoot = NULL; /* The first source file is the spec file */ x = 0; |