pkgtools

morpheus pkg tools
git clone git://git.2f30.org/pkgtools.git
Log | Files | Refs | README | LICENSE

commit b0cffec486336c505982016bf7a997500f470626
parent b05eb025f74807146bf6a7246a24bbdb017366b8
Author: sin <sin@2f30.org>
Date:   Tue Jun 24 16:48:28 +0100

No need for a temp var

Diffstat:
pkg.c | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/pkg.c b/pkg.c @@ -327,13 +327,11 @@ struct pkgentry * pkgentry_new(struct db *db, const char *file) { struct pkgentry *pe; - char path[PATH_MAX]; pe = emalloc(sizeof(*pe)); - estrlcpy(path, db->prefix, sizeof(path)); - estrlcat(path, "/", sizeof(path)); - estrlcat(path, file, sizeof(path)); - estrlcpy(pe->path, path, sizeof(pe->path)); + estrlcpy(pe->path, db->prefix, sizeof(pe->path)); + estrlcat(pe->path, "/", sizeof(pe->path)); + estrlcat(pe->path, file, sizeof(pe->path)); estrlcpy(pe->rpath, file, sizeof(pe->rpath)); return pe; }