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:
94e64fe
)
Remove unnecessary xstrdup() of dynamically allocated buffer
author
Panu Matilainen
<pmatilai@redhat.com>
Fri, 18 Apr 2008 12:39:07 +0000
(15:39 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Fri, 18 Apr 2008 12:39:07 +0000
(15:39 +0300)
- leftover from when target buffer was static...
rpmio/macro.c
patch
|
blob
|
history
diff --git
a/rpmio/macro.c
b/rpmio/macro.c
index
c8af070
..
23ecd69
100644
(file)
--- a/
rpmio/macro.c
+++ b/
rpmio/macro.c
@@
-1593,7
+1593,7
@@
rpmExpand(const char *arg, ...)
va_list ap;
if (arg == NULL) {
-
res
= xstrdup("");
+
buf
= xstrdup("");
goto exit;
}
@@
-1607,10
+1607,9
@@
rpmExpand(const char *arg, ...)
pe = stpcpy(pe, s);
va_end(ap);
(void) expandMacros(NULL, NULL, buf, blen);
- res = xstrdup(buf);
exit:
-
_free(buf)
;
+
res = buf
;
return res;
}