Introduce xbps_xasprintf() and use it where required.

--HG--
extra : convert_revision : 324a92a4824476059e0993d00c2b925c732a79f8
This commit is contained in:
Juan RP
2009-04-04 19:32:39 +02:00
parent f5dd58df5d
commit 4bf5c5f750
14 changed files with 108 additions and 175 deletions

View File

@@ -262,7 +262,7 @@ xbps_repo_genindex(const char *pkgdir)
(strcmp(archdirs[i], "noarch")))
continue;
path = xbps_append_full_path(false, pkgdir, archdirs[i]);
path = xbps_xasprintf("%s/%s", pkgdir, archdirs[i]);
if (path == NULL)
return errno;
@@ -282,8 +282,7 @@ xbps_repo_genindex(const char *pkgdir)
continue;
foundpkg = true;
binfile = xbps_append_full_path(false, path,
dp->d_name);
binfile = xbps_xasprintf("%s/%s", path, dp->d_name);
if (binfile == NULL) {
(void)closedir(dirp);
free(path);