projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00d48de
)
Don't bother calculating string sizes manually
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 9 Jan 2009 15:05:40 +0000
(17:05 +0200)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 9 Jan 2009 15:07:17 +0000
(17:07 +0200)
- ...and one less strcpy() to grep for
build/files.c
patch
|
blob
|
history
diff --git
a/build/files.c
b/build/files.c
index
bd55a41
..
1f5212e
100644
(file)
--- 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;