summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-01-09 17:05:40 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-01-09 17:07:17 +0200
commite1474f4b1d71a0021ca359dbdd60a17984eb0ff2 (patch)
treeeb0fd44d6668f737dfd9b370f8ff59d17a0e5347 /build
parent00d48deffecb109c1dcfff2ee9c9a27ca412a16f (diff)
downloadrpm-e1474f4b1d71a0021ca359dbdd60a17984eb0ff2.tar.gz
rpm-e1474f4b1d71a0021ca359dbdd60a17984eb0ff2.tar.bz2
rpm-e1474f4b1d71a0021ca359dbdd60a17984eb0ff2.zip
Don't bother calculating string sizes manually
- ...and one less strcpy() to grep for
Diffstat (limited to 'build')
-rw-r--r--build/files.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/build/files.c b/build/files.c
index bd55a4124..1f5212eb9 100644
--- a/build/files.c
+++ b/build/files.c
@@ -2088,11 +2088,9 @@ int processSourceFiles(rpmSpec spec)
/* Init the file list structure */
memset(&fl, 0, sizeof(fl));
if (_srcdefattr) {
- char *a = xmalloc(strlen(_srcdefattr) + 9 + 1);
- strcpy(a, "%defattr ");
- strcpy(a + 9, _srcdefattr);
+ char *a = rstrscat(NULL, "%defattr ", _srcdefattr, NULL);
parseForAttr(a, &fl);
- a = _free(a);
+ free(a);
}
fl.fileList = xcalloc((spec->numSources + 1), sizeof(*fl.fileList));
fl.processingFailed = 0;