diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-04-22 15:23:38 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-04-22 15:23:38 +0300 |
commit | 6e090dc5c5bdfad6f8a38d2a1efb47b361d98c7e (patch) | |
tree | 9315c7eed27d9ae9fc19cff1c74eb940a1f4a536 /rpmdb | |
parent | 338c9be61eef414ea361ac849bc1f926429957f6 (diff) | |
download | librpm-tizen-6e090dc5c5bdfad6f8a38d2a1efb47b361d98c7e.tar.gz librpm-tizen-6e090dc5c5bdfad6f8a38d2a1efb47b361d98c7e.tar.bz2 librpm-tizen-6e090dc5c5bdfad6f8a38d2a1efb47b361d98c7e.zip |
Simplify rebuild path generation
Diffstat (limited to 'rpmdb')
-rw-r--r-- | rpmdb/rpmdb.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c index ba6ef2300..4bc70004d 100644 --- a/rpmdb/rpmdb.c +++ b/rpmdb/rpmdb.c @@ -3361,13 +3361,8 @@ int rpmdbRebuild(const char * prefix, rpmts ts, tfn = rpmGetPath("%{?_dbpath_rebuild}", NULL); if (!(tfn && tfn[0] != '\0' && strcmp(tfn, dbpath))) { - char pidbuf[20]; - char *t; - sprintf(pidbuf, "rebuilddb.%d", (int) getpid()); - t = xmalloc(strlen(dbpath) + strlen(pidbuf) + 1); - (void)stpcpy(stpcpy(t, dbpath), pidbuf); tfn = _free(tfn); - tfn = t; + rasprintf(&tfn, "%srebuilddb.%d", dbpath, (int) getpid()); nocleanup = 0; } newdbpath = newrootdbpath = rpmGetPath(prefix, tfn, NULL); |